[vox-tech] NFS mounting a VFAT filesystem - uid and gid
Marc Elliot Hall
marc at hallmarc.net
Thu Aug 18 07:28:48 PDT 2005
issues?
Reply-To: Marc Elliot Hall <marc at hallmarc.net>
In-Reply-To: <4303AF05.9000703 at fmailbox.com>
On Wed, Aug 17, 2005 at 02:41:25PM -0700, Ken Herron wrote:
> Marc Elliot Hall wrote:
>
> > #make /windows partition owned by user nobody and group webusers
> > /dev/hda4 /windows vfat \
> > rw,user,auto,gid=82,uid=501,umask=000 0 2
>
> Okay, on "tiny", files on the partition should have UID 501, GID 82,
> and
> umask 000. Is that what actually happens?
No, it's not. At least, not now.
> >However, although the data
> >appears to be properly available on "oracle" when I execute
> >
> >$ mount tiny.hallmarc.net:/windows
> >
> >the ownership of the directories and files remains slightly off
> >(group
> >should be "webusers" based on *my* understanding of the mount
> >options).
> >
> >$ ls -la /var/www/
> >
> >drwxrwx--- 3 nobody users 32768 Aug 16 18:30 tiny/
>
> NFS communicates file ownership using UID and GID numbers, not names.
> On
> the host "oracle", what UID is "nobody"? What GID is "users"?
I misspoke earlier (I'd been making w-a-a-a-y too many changes while
troubleshooting this issue). Although on both hosts, "nobody" is 65534
and "users" is 100, what I want to happen is for it to mount UID 501
(user "mandrakemarc" on "tiny" and user "marc" on "oracle") and GID 82
(group "webusers" on both hosts). However, what I'm getting is UID 65534
and GID 100 (again, user "nobody" and group "users" on both hosts). At
one point, that's what I was trying for... and now it won't change :-(
Troubleshooting procedure:
marc at oracle: $ umount /var/www/tiny
marc at tiny: $ umount /windows
marc at tiny: $ sudo vi /etc/fstab
(make minor edit to fstab, changing uid or gid, save changes...)
marc at tiny: $ mount /dev/hda4
marc at tiny: $ ls -la /windows
total 68
drwxrwx--- 3 nobody users 32768 2005-08-18 09:43 .
drwxr-xr-x 22 root root 4096 2005-08-02 18:51 ..
drwxrwx--- 3 nobody users 32768 2005-08-16 08:15 data
marc at oracle: $ mount /var/www/tiny
marc at oracle: $ ls -la /var/www/tiny
drwxrwx--- 3 nobody users 32768 Aug 18 2005 ./
drwxr-xr-x 13 root root 4096 Aug 16 17:38 ../
drwxrwx--- 3 nobody users 32768 Aug 16 08:15 data/
As you can see, user "nobody" and group "users" seem to be persistent,
regardless of what I do in /etc/fstab.
> Your "mount" command there looks like it was done as a normal user. If
> you perform the mount as root, do the perms come out differently?
The same holds true if I preface mount and umount commands with sudo.
> FWIW,
> for ongoing use you're better off using an automounter such as amd,
> rather than putting it in fstab.
I'll look into that further. Thanks for the tip!
--
Marc Elliot Hall
621 River Moss Drive
St. Peters, MO 63376
www.hallmarc.net
More information about the vox-tech
mailing list