View previous topic :: View next topic |
Author |
Message |
Xylene Tux's lil' helper
Joined: 01 Sep 2003 Posts: 111
|
Posted: Fri Feb 24, 2006 8:03 am Post subject: Normal users can't read mounted FAT32 |
|
|
I just setup Gentoo and I have everything else working. I can't seem to figure out how to get normal users to be able to read some mounted FAT32 parititons.
If I do "ls /mnt/storage" I can see the directories there, but when I try to read another directory in, permission denied.
My /etc/fstab is
Code: | # /etc/fstab: static file system information.
# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.18.4.1 2005/01/31 23:05:14 vapier Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# See the manpage fstab(5) for more information.
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda5 /boot ext3 noauto,noatime 1 2
/dev/hda6 / ext3 noatime 0 1
/dev/hda7 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
/dev/hda4 /mnt/storage vfat noatime 0 0
/dev/hda2 /mnt/storage2 vfat noatime 0 0
# NOTE: The next line is critical for boot!
proc /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
|
I've never had this problem so I'm pretty much completely lost right now. |
|
Back to top |
|
|
biznatch Apprentice
Joined: 23 Jul 2004 Posts: 220 Location: Wichita, KS
|
Posted: Fri Feb 24, 2006 9:06 am Post subject: |
|
|
What are the premissions on /mnt/storage? Run "ls -l /mnt" and post the results. Thanks. _________________ While your waiting for your post to be answered, please help with unanswered posts. |
|
Back to top |
|
|
lyallp Veteran
Joined: 15 Jul 2004 Posts: 1579 Location: Adelaide/Australia
|
Posted: Wed Mar 01, 2006 3:17 am Post subject: |
|
|
What I did was...
Read the mount man page.
Quote: |
Mount options for fat
uid=value and gid=value
Set the owner and group of all files. (Default: the uid and gid of the current process.)
umask=value
Set the umask (the bitmask of the permissions that are not present). The default is the umask of the current process. The
value is given in octal.
dmask=value
Set the umask applied to directories only. The default is the umask of the current process. The value is given in octal.
fmask=value
Set the umask applied to regular files only. The default is the umask of the current process. The value is given in octal.
|
I create a /etc/group entry called 'vfat'. (groupadd)
I then add the users that I want to have access to vfat partitions to that group. (usermod)
I replace your fstab entry
Code: | /dev/hda4 /mnt/storage vfat noatime,gid=vfat,umask=007,dmask=007,fmask=007,user 0 0 |
(note, the 'user' option means I can unmount and re-mount as non-root - this is optional, in your case)
Now, unmount and re-mount the partition using 'root'.
Only people in the 'vfat' group should be able to read and write to your vfat systems. (other than root that is)
Of course, you can fiddle with the masks a bit to give non-vfat people read-only if you want. _________________ ...Lyall |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|