LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-27-2005, 11:24 PM   #1
seelk
Member
 
Registered: Apr 2004
Location: NJ
Distribution: Ubuntu
Posts: 51

Rep: Reputation: 15
Question File and Folder permissions


I'm a rookie when it comes to linux. My question is, I have a partition /downloads. I do not have access to this to save downloaded files in there. I was wondering how can I set my user to have access to files/folders? Thanks in advance.
 
Old 01-28-2005, 12:10 AM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
as root you can chown to your user... that'll give you ownership of the directory.. it would look like this:

chown yourusername:yourusergroup /downloads

you can ls -l to see what's there already, and help diagnose the problem...


of course this will not work if /downloads is a mount point (which i'm assuming it's not)
 
Old 01-28-2005, 12:39 AM   #3
dping
Member
 
Registered: Dec 2004
Location: Oregon, USA
Distribution: Kubuntu 9.04
Posts: 181

Rep: Reputation: 30
Or, if /downloads is a mount point (and it is mounting at boot), then add umask=0 to the options list of the proper line of your fstab file.
You would need to become root, then open up fstab, which will be in the /etc directory (/etc/fstab).

In fstab you will see a number of entries that look similar to this:
Code:
/dev/hdxx /mount_point fs_type option1,option2,option3 0 0
Where "hdxx" corresponds to a hard-drive partition and could be many different letter/number combinations like "hda1" or "hdb3". Each "option" could be any number of different things as well, and fs_type is the file-system type for each partition.

If /downloads is a mount point set to mount on boot, then one of your fstab lines will look like this:
Code:
/dev/hdxx /downloads fs_type option1,option2 0 0
Simply add umask=0 like so:
Code:
/dev/hdxx /downloads fs_type umask=0,option1,option2 0 0
umask=0 makes that mount read/writeable by any user on your system. There are other ways of doing it too, but umask feels like it has more finess.

Last edited by dping; 01-28-2005 at 12:45 AM.
 
Old 01-28-2005, 03:05 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If the filetype is vfat (fat32) then you can make yourself the owner of the partition of the by adding a 'uid=' option in the fstab entry. You can use either your uid number or your username.
 
Old 01-28-2005, 06:27 AM   #5
RanDrake10
Member
 
Registered: Oct 2004
Location: Florida
Distribution: Debian
Posts: 319

Rep: Reputation: 30
With a GUI log in as root, right click the dir, go to the permissions tab and change to user.
 
Old 01-28-2005, 08:09 AM   #6
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
Quote:
With a GUI log in as root, right click the dir, go to the permissions tab and change to user.
no offense, but that's what i hate about GUIs in linux... they give people an uninformed alternative to actually learning how to do something. moreover, that won't work with all the mount-point chatter above. Permissions aren't difficult to learn, and quite logical to follow. invest the time.
 
Old 01-28-2005, 10:56 AM   #7
seelk
Member
 
Registered: Apr 2004
Location: NJ
Distribution: Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 15
Hey guys I truly appreciate all your suggestions. This would help me a lot.

Since we're in the topic of permissions and such is there a way to give my user account root privileges accross the OS? I hate to always have to change to root for any little thing I want to do with the system. I just basically want to learn to do this just so I can determine if my user account does need root privileges or not after trying it.
 
Old 01-28-2005, 11:41 AM   #8
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
Quote:
Since we're in the topic of permissions and such is there a way to give my user account root privileges accross the OS?
This is not a good idea! Then you can work as root anyway, there is no difference.

Believe me, it makes sense to have user- and root-permissions separated. As secesh said already: invest some time to learn about permissions and you'll have a far more stable system to enjoy for a long time
 
Old 01-28-2005, 11:49 AM   #9
dping
Member
 
Registered: Dec 2004
Location: Oregon, USA
Distribution: Kubuntu 9.04
Posts: 181

Rep: Reputation: 30
I wouldn't recommend that. I destroyed several systems early on from messing around too much as root.
After a while you get used to having to switch, and you come to appreciate the safe-guards. By the way, you don't have to logout/login to get root access, the su command is your friend. If you know enough command line to su to root and then pull up a file manager (ie: konqueror), then things become quite easy.

I have never done it, but I assume that giving your user root privilages accross-the-board would be as simple as pulling up kuser and adding yourself to the root group.
 
Old 01-28-2005, 06:50 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can use 'sudo' to execute a single command as root. It is setup by using the 'visudo' program (with is actually vi). The file you edit has several commented examples, and you may be able to simply delete the '# ' charactors before the line without making any other changes.
You may want to make yourself a member of the 'wheel' group.

The 'sudoers' file may have an info page on your system.

Last edited by jschiwal; 01-29-2005 at 05:40 PM.
 
  


Reply



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
File/folder permissions Yig Linux - Newbie 3 11-28-2005 03:44 PM
File and folder permissions steve007 Linux - Newbie 3 06-30-2005 03:48 AM
can we overwrite the permissions of folder/file zameer_india Linux - Networking 0 09-30-2004 01:11 AM
File/Folder Permissions with FTP scottpioso Linux - Security 8 03-12-2004 02:19 PM
File / folder Permissions bkbroil Linux - Newbie 3 10-15-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 04:29 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