View previous topic :: View next topic |
Author |
Message |
tdm Tux's lil' helper
Joined: 06 May 2002 Posts: 117 Location: The Netherlands
|
Posted: Fri Jan 03, 2003 4:15 pm Post subject: User can't access / read / write some mountpoints |
|
|
I've added a user with the superadduser script and everything is created nicely. But the user can't access some mountpoints.
I've some vfat (fat32) and ext3 partitions for downloads and every user schould be able to read and write from and to those partitions.
Are there special settings I have to do?
Of which groups should a normal user be member off?
The user and group of the partitions are now set to root root, the mountpionts are mounted automaticly by /etc/fstab
Any idea?
Thanks! |
|
Back to top |
|
|
Erik Andersson n00b
Joined: 19 Apr 2002 Posts: 27 Location: Sweden
|
Posted: Sat Jan 04, 2003 1:07 pm Post subject: |
|
|
Set the umask to the value you want. umask=000 for full access to the fat32 for all users. Don't bother with dmask and fmask for fat32, they don't work. I use umask=007 and root:wheel. |
|
Back to top |
|
|
tdm Tux's lil' helper
Joined: 06 May 2002 Posts: 117 Location: The Netherlands
|
Posted: Sat Jan 04, 2003 5:16 pm Post subject: |
|
|
umask is for all newly created files am I right?
That's not what I want.
I want that my users can access and read & write files at directories/mountpionts like /downloads
And if I could use umask.. how to apply it only on surtan directories?
When I try to change the group of the mount point to 'users' then I get output like this:
Code: | # chgrp -R users /mnt/wdown2
....
chgrp: changing group of `wdown2/music/Milk Inc - Sleepwalker-Vinyl-2002-DOC/03-sleepwalker_(acapella)-doc.mp3': Operation not permitted
... |
And then Code: | chmod 775 /mnt/wdown2 |
As far as I know that would give the user the permission to read, write, and execute files from the /mnt/wdown2 mountpoint, am I right?
What am I doing wrong?
Thanks |
|
Back to top |
|
|
Erik Andersson n00b
Joined: 19 Apr 2002 Posts: 27 Location: Sweden
|
Posted: Sat Jan 04, 2003 8:57 pm Post subject: |
|
|
From my fstab:
/dev/hda5 /darkstar vfat umask=007,nosuid,nodev,noexec,gid=wheel
Read the man page for more info. |
|
Back to top |
|
|
keratos68 Guru
Joined: 27 Dec 2002 Posts: 561 Location: Blackpool, Lancashire, UK.
|
Posted: Sun Jan 05, 2003 12:15 am Post subject: |
|
|
As root, create a new user group that you can use to hold all the users who are to read/write to your areas (like /downloads):
Next add all the relevant users to this new group, the usermod script can do this but first use the groups <existing-username> command to identify what groups a user is ALREADY in:
e.g.
Code: | groups joe
<<returns a list of groups that "joe" is in>>
usermod -G downloaders, <existing-group-list> joe |
where "existing-group-list" is the comma separated list for groups obtained from the groups command.
So, this might be the sequence:
Code: | #groups joe
users joe
#usermod -G users,daz,downloaders joe |
If you dont put these existing groups in, then joe would be removed from them and only left in the downloaders group
Next, edit /etc/fstab to mount your selected filesystems such that "root" and any users in the "downloaders" group have full access:
Code: | /dev/hda5 /darkstar vfat umask=007,gid=downloaders,rw 0 1 |
TO USE Erik's EXAMPLE!!
Default protection modes for a mounted vfat filesystem will be 777 i.e. full access for all. "umask=007" masks off the last three (7 being binary for three!) mode bits to leave 770 i.e. full access for "root" and anyone in the "downloads" group.
The "0 1" (zero one) at the end tells Linux not to dump the filesystem and to check the filesystem on each boot pass.
I wouldn't bother with the other switches!!!
Try that. _________________ Someone told me that "..they only ever made one mistake...."
...and that's when they said they were wrong!! |
|
Back to top |
|
|
tdm Tux's lil' helper
Joined: 06 May 2002 Posts: 117 Location: The Netherlands
|
Posted: Sun Jan 05, 2003 4:07 pm Post subject: |
|
|
Awsome, it's working perfectly now
Thanks the perfect explanation dazzle68, and Erik for the fstab sample
/me happy |
|
Back to top |
|
|
|