[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automount permissions problem



On Sat, July 26 at  5:49 PM EDT
Neal Lippman <nl@lippman.org> wrote:

>Here's my problem, maybe someone can help. I have a usb media reader
>than handles smartmedia, compact flash, etc. It works fine in the sense
>of being able to put media into it and mount the media, using the
>usb-storage module, and copy files off the media. The devices look like
>scsi disk drives, as expected with the use of usb-storage.
>
>It would be ideal to be able to use autofs to mount these drives, as I
>do for my dvd and cdrw drives, so I added the appropriate entries into
>auto.mount, the control file for my /mount automount directory. It
>looks like this:
>
># Automount map file
># 6/4/02 nl
>#
>#format: 
># key [ -mount-options-separated-by-comma ] location
>dvd	-fstype=iso9660,ro,nosuid,nodev,exec,user	:/dev/dvd
>cdrw	-fstype=iso9660,ro,nosuid,nodev,exec,user	:/dev/cdrw
>floppy	-fstype=vfat,nosuid,noauto,user,nodev,unhide	:/dev/floppy
>cf	-fstype=vfat,ro,nosuid,noauto,user		:/dev/cf
>sm	-fstype=vfat,ro,nosuid,noauto,user		:/dev/sm
>
>/dev/cf and /dev/sm are symlinks to /dev/sda1 and /dev/sdb1.
>
>The media cards automount all right, but the protections on the
>directories created by autofs is rwxr--r--, which means I cannot cd
>into or list the files in subdirectories on the media unless I become
>root, which is not ideal. And that's the problem.
>
>I don't have this problem with automounted cd's or dvd's - the
>protection mask for those is rwxr-xr-x, so all works fine.
>
>Is there something I should have done in the auto.mount file? Is this
>something about the way the cf and sm cards work (they are formatted in
>a digital camera, so I don't really have any control over how various
>bits are set in the filesystem.
>
>Any thoughts/help appreciated.

I don't use automount but to get proper permissions for my vfat fs's i
use this type or entry in fstab
/dev/hdb1       /mnt/win98              vfat    defaults,gid=6,umask=002

then as long as I am in group 6 ( disk on my box ) I have read access...
The key is the umask portion and equates to permissions of 775 or
rwxrwxr-x in case you aren't familiar with umask.

HTH,

Shawn Lamson
shawn.lamson@verizon.net



Reply to: