Bug 6124 - mount of UDF fs ignores UID and GID options
Summary: mount of UDF fs ignores UID and GID options
Status: CLOSED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 13:23 UTC by Michael
Modified: 2007-09-18 11:21 UTC (History)
6 users (show)

See Also:
Kernel Version: 2.6.15
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Michael 2006-02-23 13:23:25 UTC
Most recent kernel where this bug did not occur:
Distribution: Kanotix (debian SID, 32bit)
Hardware Environment: Desktop PC, AMD 64, as well as on Laptop, i586
Software Environment: Debian SID, 32bit
Problem Description:
Mounting a UDF formatted DVD results in all files belonging to root,
irrespectable of UID and GID options at mount. UMASK applies correctly, on the
other hand.

Steps to reproduce:
Burn DVD with UDF format (e.g. via k3b), no iso9660 file structure. Mount via
"mount /dev/<your DVDdrive> /media/<your DVDdrive> -t udf -o
nodev,nosuid,noexec,UID=1000,GID=1000,UMASK=007".
Mounted files are all owned bei root:root. No access for user 1000 possible.

I guess, this is not the correct behaviour, as otherwise the GID/UID options
should not exist for UDF at all.

ISO9660 format works correctly.

Michael
Comment 1 Michael 2006-02-23 13:40:55 UTC
oops, the mount command was "mount /dev/<your DVDdrive> /media/<your DVDdrive>
-t udf -o nodev,nosuid,noexec,user,UID=1000,GID=1000,UMASK=007" (missed the user
option, when writing the bug entry).
Comment 2 Michael 2006-02-23 23:20:18 UTC
It's possible that the same problem is also the basis of this discussion here:
http://www.ussg.iu.edu/hypermail/linux/kernel/0602.1/1409.html
Comment 3 Natalie Protasevich 2007-07-06 21:15:50 UTC
There were some UDF patches posted in the latest kernel, I think 2.6.22-rc5
Would you like to test this release?
Thanks.
Comment 4 Eric Sandeen 2007-07-09 10:15:34 UTC
I'll ponder this more when I have more time, but I have a similar bug here:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=195860

to which I posted....

The uid & gid options are better explained in the kernel Documentation/filesystems/udf.txt file:

====
        gid=            Set the default group.
...
        uid=            Set the default user.
...
The uid= and gid= options need a bit more explaining.  They will accept a
decimal numeric value which will be used as the default ID for that mount.
They will also accept the string "ignore" and "forget".  For files on the disk
that are owned by nobody ( -1 ), they will instead look as if they are owned
by the default ID.  The ignore option causes the default ID to override all
IDs on the disk, not just -1.  The forget option causes all IDs to be written
to disk as -1, so when the media is later remounted, they will appear to be
owned by whatever default ID it is mounted with at that time.

For typical desktop use of removable media, you should set the ID to that
of the interactively logged on user, and also specify both the forget and
ignore options.  This way the interactive user will always see the files
on the disk as belonging to him.

===

So it sounds like mounting with "uid=ignore" may solve the issue, and allow you
to read all files.  As far as what Gnome should be using for mount options, I'm
not certain... I think the udf code is behaving as expected, though.

-------

But, the original filer reports that this still doesn't quite help, as his root directory was not +x, and therefore not browseable...
Comment 5 Andrew Morton 2007-07-24 12:29:59 UTC
I queued a fix into -mm as udf-fix-uid-and-gid-mount-option-ignorance.patch.

Michael, could you please test it?

Thanks.
Comment 6 Adrian Bunk 2007-09-18 11:21:03 UTC
The patch is in 2.6.23-rc.

Note You need to log in before you can comment on or make changes to this bug.