Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Normal users can't read mounted FAT32
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Xylene
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2003
Posts: 111

PostPosted: Fri Feb 24, 2006 8:03 am    Post subject: Normal users can't read mounted FAT32 Reply with quote

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
View user's profile Send private message
biznatch
Apprentice
Apprentice


Joined: 23 Jul 2004
Posts: 220
Location: Wichita, KS

PostPosted: Fri Feb 24, 2006 9:06 am    Post subject: Reply with quote

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
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1579
Location: Adelaide/Australia

PostPosted: Wed Mar 01, 2006 3:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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