LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 03: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, 03:31 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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, 04:24 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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 04:26 PM.
 
Old 04-05-2009, 05: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 05:26 PM.
 
Old 04-05-2009, 05:33 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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 05:34 PM.
 
Old 04-05-2009, 10: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, 10:21 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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, 10: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-05-2009, 11:12 PM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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-05-2009, 11:18 PM   #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-05-2009 at 11:19 PM.
 
Old 04-05-2009, 11:26 PM   #11
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
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, 09: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, 09:37 AM   #13
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
=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 06:54 PM
download from command line nate11000 Linux - Newbie 4 05-26-2006 04:35 PM
command Line SSH download-upload mirat46 Linux - Newbie 1 05-11-2006 04:12 PM
Please recommend a command-line download tool for SuSE ICO SUSE / openSUSE 3 08-23-2005 01:42 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:34 AM.

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
Open Source Consulting | Domain Registration