2002-11-13 00:40:17

by Udo A. Steinberg

[permalink] [raw]
Subject: VFAT mount (bug or feature?)


Hello,

In my /etc/fstab I have the following entry:

/dev/hda1 /win vfat defaults,umask=022 1 1

Why does 2.5.47 have user/group restricted permissions on the mount
point and all its subdirectories, despite the umask setting?

uas@Corona:~> uname -a
Linux Corona 2.4.20-rc1 #1 Tue Oct 29 23:39:44 CET 2002 i686 unknown
uas@Corona:~> ls -lad /win
drwxr-xr-x 22 root root 16384 Jan 1 1970 /win


uas@Corona:~> uname -a
Linux Corona 2.5.47 #3 Mon Nov 11 20:02:05 CET 2002 i686 unknown
uas@Corona:~> ls -lad /win
drwxr--r-- 22 root root 16384 Jan 1 1970 /win

uas@Corona:~> mount --version
mount: mount-2.11w


Regards,
-Udo.


Attachments:
(No filename) (189.00 B)

2002-11-13 14:56:53

by OGAWA Hirofumi

[permalink] [raw]
Subject: Re: VFAT mount (bug or feature?)

"Udo A. Steinberg" <[email protected]> writes:

> Hello,
>
> In my /etc/fstab I have the following entry:
>
> /dev/hda1 /win vfat defaults,umask=022 1 1
>
> Why does 2.5.47 have user/group restricted permissions on the mount
> point and all its subdirectories, despite the umask setting?

The dmask option was added at 2.5.43. It's umask for directory, and
default is umask of process when mounting. Please use it.

eg.
# mount -t vfat /dev/xxx /xxx -o dmask=022

Regards
--
OGAWA Hirofumi <[email protected]>

2002-11-13 15:29:20

by Andries Brouwer

[permalink] [raw]
Subject: Re: VFAT mount (bug or feature?)

On Wed, Nov 13, 2002 at 01:47:04AM +0100, Udo A. Steinberg wrote:

> In my /etc/fstab I have the following entry:
>
> /dev/hda1 /win vfat defaults,umask=022 1 1
>
> Why does 2.5.47 have user/group restricted permissions on the mount
> point and all its subdirectories, despite the umask setting?

Yes. This is due to a somewhat buggy change in 2.5.43.

(In the good old days umask had a well-defined meaning;
today on recent 2.5 and with vfat, but not with ntfs,
it means something else.)

The correct change would have been to add both dmask and fmask,
just like ntfs did, and leave the meaning of umask alone.

(I made a patch a few days ago, but have not yet found
the time to submit it to Linus. Maybe tomorrow,
if nobody else does it first.)

Andries