Re: [Hampshire] fstab question

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] fstab question

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x569ce100.hantslug.org.uk.2936': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Mon Aug 6 16:43:54 2007 BST
gpg: using DSA key B2C27BC21C335860
gpg: Can't check signature: No public key
On Mon, Aug 06, 2007 at 04:25:04PM +0100, Owain Clarke wrote:
> I wonder if anyone could help me, as it's not clear to me from the man
> page what I've got wrong.
>
> I have this line in /etc/fstab:-
>
> /dev/hdb1  /windows/e  ntfs  ro,users    0    0

>
> The intention is that I can read files in this partition as an ordinary
> user - I'm not interested in writing to it as I haven't investigated the
> current state of play with writing to NTFS. But when I try to open the
> directory to read I get a permission denied message, with access as
> read-only for root and none for anyone else. What have I got wrong?


NTFS file permissions are far more complex than standard Unix ones,
so Linux doesn't even attempt to map between them. Instead, it sets a
single set of permissions over the whole filesystem at once, with
mount options. Instead of "ro,users", you probably want something like
"ro,user,uid=myuser,gid=mygroup,umask=0222". (Note: "user", not
"users"). The umask value will give you read and execute for all users
on all objects within the filesystem. You may want to use 0220
instead, which will allow read and execute for the specified user and
group only.

This is covered, briefly, in the "ntfs" section of "man mount".

Note that "user" as an option in fstab will allow non-root users to
mount the filesystem, and only the user which mounts it to be able to
unmount it afterwards. It has nothing to do with permissions on the
filesystem itself.

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
    --- SCSI is usually fixed by remembering that it needs three ---     
        terminations: One at each end of the chain. And the goat.