Bug 81201
Summary: | Unable to change permissions on VFAT mounted partitions | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Public Beta | Reporter: | Chris Ford <crford> | ||||
Component: | util-linux | Assignee: | Elliot Lee <sopwith> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Ben Levenson <benl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | phoebe | CC: | bugs.michael, wtogami | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-01-13 21:34:13 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 79579 | ||||||
Attachments: |
|
Description
Chris Ford
2003-01-06 18:24:27 UTC
I forgot to mention that it changes the date on the mount point to Dec 31 1969 when it is mounted. [root@dagobah mnt]# ls -al total 36 drwxr-xr-x 8 root root 4096 Jan 6 11:31 . drwxr-xr-x 19 root root 4096 Jan 2 22:52 .. drwxr-xr-x 2 root root 4096 Dec 29 19:29 cdrom drwxr-xr-x 2 root root 4096 Dec 29 19:29 cdrom1 drwxr-xr-x 2 root root 4096 Dec 29 19:29 floppy drwxr-xr-x 73 cford cford 8192 Jan 6 11:30 nfs drwxr-xr-x 2 root root 4096 Dec 31 11:58 poop drwxr-xr-x 2 root root 4096 Jan 6 11:31 win [root@dagobah mnt]# mount -t vfat /dev/hda1 /mnt/win/ [root@dagobah mnt]# ls -al total 48 drwxr-xr-x 8 root root 4096 Jan 6 11:31 . drwxr-xr-x 19 root root 4096 Jan 2 22:52 .. drwxr-xr-x 2 root root 4096 Dec 29 19:29 cdrom drwxr-xr-x 2 root root 4096 Dec 29 19:29 cdrom1 drwxr-xr-x 2 root root 4096 Dec 29 19:29 floppy drwxr-xr-x 73 cford cford 8192 Jan 6 11:30 nfs drwxr-xr-x 2 root root 4096 Dec 31 11:58 poop drwxr--r-- 28 root root 16384 Dec 31 1969 win [root@dagobah mnt]# You are on the right track with the ownership, just add the "umask" settings to the /etc/fstab file also. For example "umask=000" would be wide open file permissions. Check the "mount" man page under "umask" for more info. That is correct about the umask, but the default permissions should be 0755 and the user should be able to change the permissions of the mounted partition. At least that is the behavior up until this point. And the default and current umask on the box is 022. I think the component should be changed to "util-linux" instead of kernel because it works as expected if you downgrade to mount from RH8.0. > And the default and current umask on the box is 022.
But mount seems to apply something like "-o umask=033" instead of "-o umask=022".
(V)FAT has no support for file permissions, so it's not possible to change the permissions of the root directory or any other part of the filesystem. All I can suggest is to read the options for fat & vfat in 'man 8 mount'... You've already been using the umask option, so I suspect just playing with that and the dmask/fmask options will get you closer to what you want. As it stands I can't yet see anything that counts as a bona fide bug... Would it be a bug that the behavior of mount changed in Phoebe? mount in all previous versions of Red Hat Linux would mount it with umask 022 by default, but it seems to mount vfat with 033 now. I can think of no logical reason for for umask 033. Question to Elliot Lee: Why does mount in Phoebe use a _default_ umask=033 instead of the previous umask=022 as in Psyche or older? It results in directories having permission rwxr--r-- (0744) instead of rwxr-xr-x (0755). Files are world-readable, directories are not accessible. Where's any logic behind such a change? I would understand if it were umask=077 (mount user-only access), but not umask=033. That's what this bug is about. Perhaps this should be opened as a new report, with the proper name "why 033 instead of 022". Created attachment 89437 [details]
patch for src.rpm
@ Chris Ford : please re-open this bug-report and change the summary to
something like "wrong umask for mounted VFAT partitions"
@ Elliot Lee : apparently, you misunderstood the bug report - *please* read the
comments from Warren and me.
> util-linux 2.11v
> * mount: set umask (Sebastian Krahmer)
There's an explicit "umask(033);" call in mount.c and umount.c which makes files
world-readable (!) by default, but directories inaccessible. An umask(077) would
make much more sense. Hence I think this *is* a bug.
|