Martins Steinbergs schreef:
> hi,
> 
> what's wrong with  these, users cant access partitions (Access denied to
> /mnt/win_j.), only root can go there.
> 
> fstab
> 
> /dev/hda1        /mnt/win_c    ntfs        defaults,ro,user    0 0
> /dev/hdb8        /mnt/win_j    vfat        defaults,rw,user    0 0
> 
> 
> Martins

Noting in particular as this is not so much an fstab issue but a
permissions issue, which are normally not controlled by fstab. However,
for vfat (and probably ntfs), you can actually control permissions via
fstab (I think the Windows fses are the only ones you can use fstab to
control their permissions).

The vfat mount needs:

1) that the mount folder /mnt/win_j should have its permissions manually
adjusted so that users (the group users, if nothing else) has rights to
read (and write to if desired) the folder itself;

2) the fstab entry should include at least the gid= option (see man
mount), so that the group to which your users belong has some ability to
own the files. You may also want to use the uid= option if you desire a
particular user to own the contents of the folder when mounted.

I only specify this for vfat, because I don't know if ntfs takes these
options (probably does). Check man mount for options specific to ntfs
mounts, and to learn more about the options for vfat mounts. Man mount
is well worth a good read through. You can do quite a lot with it, once
you know how.

Optional:

You may want to get rid of that 'defaults' option; it restricts the
mount from being automounted, and restricts any executables on the mount
from being executed (afaik). 'default' means, among other options,
noauto, nosuid, and noexec; you have managed to avoid the default
setting of 'defaul root-only mounting' by adding the 'user' flag after
the 'default' flag (so the user flag supercedes the default setting),
but that has always seemed redundant to me. I prefer just to get rid of
'defaults' and explicitly set the options the way I want them. YMMV.

You may also want to use the umask= option to specify read/write/execute
permissions for the files mounted. Again, see man mount.

Hope this helps,
Holly
-- 
[email protected] mailing list

Reply via email to