LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-04-2007, 07:52 PM   #1
staph
LQ Newbie
 
Registered: Feb 2007
Posts: 7

Rep: Reputation: 0
Trouble assigning permissions


My question is, how can I change permissions so that users (not just root) can write files to my vfat partition hda6? A description of my problem is typed below.

I recently was able to edit /etc/fstab so that it will mount hda6 (a fat32 partition) on bootup. When I am logged in as a user, I am able to open up things such as jpeg files from hda6, however I can't seem to play any of the music I have stored on hda6 or save any new files to hda6.

So...I logged in as root. I right clicked the icon for hda6 that's on the desktop and went to "Properties". From their I went to the tab labeled "Permissions". There are a bunch of boxes to check, where one can select to give access to read, write, and/or execute to the owner, group, and others. Everytime I try to check "write" to give "others" the right to write to hda6, the box is checked and suddenly the check disappears. If I try to change the owner to my username, it tells me I do not have permission (even though I am root).
 
Old 02-04-2007, 08:06 PM   #2
wahming
Member
 
Registered: Jan 2007
Posts: 133

Rep: Reputation: 15
Did you mount it as read-only, or read-write?
 
Old 02-05-2007, 05:10 AM   #3
staph
LQ Newbie
 
Registered: Feb 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by wahming
Did you mount it as read-only, or read-write?
Not sure...in etc/fstab I have:

/dev/hda6 /mnt/hda6 vfat defaults,auto,user 0 2
 
Old 02-05-2007, 06:05 AM   #4
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
You didn't say which distro you were using, but:

Some distros add each new user to a "users" group. If yours doesn't (like Ubuntu), you could create such a group, and add every member to it.

Then, you could add gid=<gid of "users"> to the mount options in fstab. This would mean that the mount is "owned" by the "users" group, and every member of this group should have full access to it. On the other hand, if yours is a single user system, you could just set uid=<your uid>.

Alternatively, you could add umask=000 to the options, to give full permissions to all on the share.

For more on options for vfat file systems, see the sections on fat and vfat mount options in the mount man page. For more on fstab and its options, see this page from tuxfiles, which states that the defaults option does set the mount to "read-write".

Hope this helps,
Rob

Last edited by Robhogg; 02-05-2007 at 06:09 AM.
 
Old 02-05-2007, 06:09 PM   #5
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
First what distro are you using, please and thank you.

Second if you are in the desktop GUI there should be settings for "Users and Groups." Simply create a group and make the user you want a member of the group which will access this fstab, then change your permissions on the directory. Make sure the setting for the group on that directory are 775 or 774 or so on or what ever you want the public to have access to (OWNER/GROUP/PUBLIC).

I'm still a newbie but I think this would work for you... even as Robhogg said just create the group and add the appropriate user(s).

Yours would look something like this right now:
[server@server etc]$ ls -l fstab
-rw-r--r-- 1 root root 687 Nov 14 21:00 fstab


After the change it could be (depends on what you set):
[server@server etc]$ ls -l fstab
xrwxrw-r-- 1 root group1 687 Nov 14 21:00 fstab


group1 being the group you create which would have the user you want to have added to that group.

I hope this is of some help and I hope that I am on the right track... someone please correct me if I am wrong ?!?!?!?!?
 
Old 02-05-2007, 06:29 PM   #6
wildar
Member
 
Registered: Jan 2007
Distribution: Mandriva 2008, Mandrake 2005, Ubuntu 8.04.1
Posts: 239

Rep: Reputation: 30
Try replacing
Code:
/dev/hda6 /mnt/hda6 vfat defaults,auto,user 0 2
with
Code:
/dev/hda6 /mnt/hda6 vfat umask=0,defaults,auto,user 0 2
and remount the partition.
 
Old 02-05-2007, 06:52 PM   #7
staph
LQ Newbie
 
Registered: Feb 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for all the info everybody, it really helps and I was able to assign permission to the users group to access hda6. (I am using debian. Sorry about that). My main issue, however, was that I could not seem to assign permissions using the GUI whilel ogged in as root...it was a strange problem, but I solved it by editing /etc/fstab as you all suggested.

Now...does anybody know what /dev/dsp is? My guess is that it has something to do with audio, whenever I try to listen to the mp3 files I have on hda6 while logged in as a user, it tells me I do not have permission to use /dev/dsp...
 
Old 02-05-2007, 06:56 PM   #8
wahming
Member
 
Registered: Jan 2007
Posts: 133

Rep: Reputation: 15
staph - the problem (I'm guessing) was that your OS did not mount the filesystem as read-write, but as read-only. In which case the only way to fix it would be telling the OS to remount it as r/w. Which you did by editing fstab.

As for dev/dsp - this might help
http://www.oreilly.de/catalog/multil...pt/ch14-05.htm

Last edited by wahming; 02-05-2007 at 06:59 PM.
 
Old 02-05-2007, 07:00 PM   #9
wildar
Member
 
Registered: Jan 2007
Distribution: Mandriva 2008, Mandrake 2005, Ubuntu 8.04.1
Posts: 239

Rep: Reputation: 30
Quote:
Originally Posted by staph
Now...does anybody know what /dev/dsp is? My guess is that it has something to do with audio, whenever I try to listen to the mp3 files I have on hda6 while logged in as a user, it tells me I do not have permission to use /dev/dsp...
Would help if you could post results of 'ls -al /dev/dsp'
 
  


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
Trouble assigning value to variable with fatsheep Programming 1 11-07-2006 07:44 PM
Assigning Network Share Permissions Woodsman Slackware 2 08-22-2006 09:53 PM
Assigning permissions for a file to be accessed by particular users praveen kumar Linux - Networking 3 05-18-2006 10:20 AM
assigning permissions ziox Programming 1 01-10-2005 09:13 AM
Assigning local permissions to imported SMB shares Ron Cook Linux - Networking 1 12-17-2004 05:12 AM

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

All times are GMT -5. The time now is 09:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration