LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 04-05-2009, 04:29 PM   #1
chandan766
LQ Newbie
 
Registered: Mar 2009
Posts: 29

Rep: Reputation: 15
Ubuntu 8.10 and want to download 2 GB file in command line.


Hi all,
I m running Ubuntu 8.10. I want to download 2GB file logging in as root in GUI, because another user's home directory has only 8GB space which is full. And it does not allow me to save file anywhere else as root is the owner of every other directory except /home/user1(which is full)
Would it be fine if i login as root in gui, connect to internet and download huge data?
Thanks
 
Old 04-05-2009, 04:31 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
why don't you login as user, open a terminal, become root, go to the directory where you want to safe the file and use wget
 
Old 04-05-2009, 05:24 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
There shouldn't be any problem if you are going to use only wget. However, you could also create a temporal directory in a place where there's space, give the user permissions over it and use your regular user to download the file.

Code:
su
Password: # type your root password
mkdir /downloads
# this will grant permissions for ALL the users
chmod 777 /downloads
exit
# now you are a normal user again
cd /downloads
wget http://whatever
You can stop the download with control+c, and resume it using wget -c http://whatever

Last edited by i92guboj; 04-05-2009 at 05:26 PM.
 
Old 04-05-2009, 06:17 PM   #4
chandan766
LQ Newbie
 
Registered: Mar 2009
Posts: 29

Original Poster
Rep: Reputation: 15
thanks for reply....but when i use wget , it just saves something to get_form and no download starts.


please help.....

Last edited by chandan766; 04-05-2009 at 06:26 PM.
 
Old 04-05-2009, 06:33 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
That url doesn't point to any real file. It runs a php script with some arguments, and I can't even enter it because it will redirect me to an error page. You would need to use a real url pointing to the file you want to download.

PS. You could try a text browser, like elinks or w3m. They should be safe to use as root as long as you don't enable javascript (I don't remember if they support such thing anyway).

Last edited by i92guboj; 04-05-2009 at 06:34 PM.
 
Old 04-05-2009, 11:13 PM   #6
chandan766
LQ Newbie
 
Registered: Mar 2009
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks but i have to supply first my credentials , only then i can proceed to download and the link i talked about is the only link to download. Is it not safe to login as a root from gui and download and save the file where i want? Is it not safe to download through GUI at all?
Thanks.
 
Old 04-05-2009, 11:21 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
There's absolutely no need to login as root. Just login as a regular user, then open a terminal and use su to become root, or sudo to launch your browser as root.
 
Old 04-05-2009, 11:58 PM   #8
chandan766
LQ Newbie
 
Registered: Mar 2009
Posts: 29

Original Poster
Rep: Reputation: 15
after i opened the terminal and become root,,,,what should be next step? I m kinda new to this Linux.
 
Old 04-06-2009, 12:12 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Quote:
Originally Posted by chandan766 View Post
after i opened the terminal and become root,,,,what should be next step? I m kinda new to this Linux.
Just launch your preferred browser, for example firefox, opera or whatever. Usually just typing its name and pressing enter.
 
Old 04-06-2009, 12:18 AM   #10
chandan766
LQ Newbie
 
Registered: Mar 2009
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks a lot.....I just followed alll ur steps about terminal and launching the firefox.....thanks a tonne. Is this equivalent to downloading as another user? Also is there any security threat as I have not installed antivirus on Linux?

Last edited by chandan766; 04-06-2009 at 12:19 AM.
 
Old 04-06-2009, 12:26 AM   #11
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Quote:
Originally Posted by chandan766 View Post
Thanks a lot.....I just followed alll ur steps about terminal and launching the firefox.....thanks a tonne. Is this equivalent to downloading as another user? Also is there any security threat as I have not installed antivirus on Linux?
Well, when you use su or sudo, you efectively become root, with all that that implies. Running as root should be limited only to strictly needed situations. I would still use the method I suggested you above: create a directory that all the users can write into, and then download using firefox or whatever.

If you are responsible enough and your software is up to date nothing bad should happen. Still, the more complex software you run as root the more risk of hitting a vulnerability or a fatal bug. Think that when you run firefox as root, any javascript you run is also run as root. That means that any casual attack coming from a javascript snippet running in firefox has god-like powers over your system. Just like crappy ActiveX under windows, and you can imagine what does that mean.

Antiviruses and firewalls can't help with that, here or in windows.

That's why it's usually not recommended to run GUI stuff as root. Text programs are simpler and less likely to expose your system to a casual attacker.
 
Old 04-06-2009, 10:27 AM   #12
chandan766
LQ Newbie
 
Registered: Mar 2009
Posts: 29

Original Poster
Rep: Reputation: 15
I created directory and have given permissions to all. Now am logged in as a user in GUI and downloading all the files into that directory which i created.
Thanks a lot but,, you were of great help.....
 
Old 04-06-2009, 10:37 AM   #13
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,220

Rep: Reputation: 231Reputation: 231Reputation: 231
=quote=
Now am logged in as a user in GUI and downloading all the files into that directory which i created.
Thanks a lot but,, you were of great help.....
=endquote=

chandan766:

A better way of complimenting a helpful senior member is to click the "thumbs-up" button at the lower right.

malek
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Download via HTTP and command line? gdeward Linux - General 4 07-23-2006 07:54 PM
download from command line nate11000 Linux - Newbie 4 05-26-2006 05:35 PM
command Line SSH download-upload mirat46 Linux - Newbie 1 05-11-2006 05:12 PM
Please recommend a command-line download tool for SuSE ICO Suse/Novell 3 08-23-2005 02:42 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 08:45 PM


All times are GMT -5. The time now is 01:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration