Ignore broken directory permissions on UDF media

Bug #635499 reported by Petar Velkovski
96
This bug affects 21 people
Affects Status Importance Assigned to Milestone
Baltix
New
Undecided
Unassigned
udisks (Ubuntu)
Fix Released
Undecided
Martin Pitt
udisks2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: gvfs

lsb_release -rd
Description: Ubuntu maverick (development branch)
Release: 10.10

When I insert an UDF formated DVD Nautilus should automount it, and open a window presenting the files contained on the DVD disk.

Instead of this, the CD/DVD ROM icon disappears from the Computer location, there is an icon that appears and instantly disappears in the Nautilus location tab, and there is no window presented with the DVD files. It is as if the disk is not mounted at all. But this is not entirely true.

The DVD I'm trying to read is inserted into an external DVD rom. It's an ordinary Asus DVD writer inserted into some generic rack (I don't think this is important, but I'm mentioning it).

This is what dmesg reports after powering the rack:
...
[ 1807.912016] usb 1-5: new high speed USB device using ehci_hcd and address 4
[ 1808.194385] Initializing USB Mass Storage driver...
[ 1808.194438] usb-storage 1-5:1.0: Quirks match for vid 067b pid 3507: 110
[ 1808.194451] scsi4 : usb-storage 1-5:1.0
[ 1808.194508] usbcore: registered new interface driver usb-storage
[ 1808.194509] USB Mass Storage support registered.
[ 1809.199155] scsi 4:0:0:0: CD-ROM ASUS DRW-2014S1 1.01 PQ: 0 ANSI: 0 CCS
[ 1809.477861] sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[ 1809.477865] Uniform CD-ROM driver Revision: 3.20
[ 1809.478052] sr 4:0:0:0: Attached scsi CD-ROM sr0
[ 1809.478427] sr 4:0:0:0: Attached scsi generic sg3 type 5

Inserting the UDF formated disk into the DVD reader.

No window is open to present the DVD in nautilus, as if the DVD was not mounted at all. Before inserting the DVD there is a CD-ROM icon in Nautilus. Now it's gone too.

But dmesg reports this:

...
[ 2121.133211] UDF-fs: Partition marked readonly; forcing readonly mount
[ 2121.171206] UDF-fs INFO UDF: Mounting volume '050927_1924', timestamp 2005/09/27 18:28 (1078)

cat /etc/mtab output:

/dev/sda6 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
/dev/sda1 /boot ext4 rw,commit=0 0 0
/dev/sda7 /home ext4 rw,commit=0 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/petar/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=petar 0 0
/dev/sr0 /media/cdrom udf ro,nosuid,nodev,utf8,user=petar 0 0

So the DVD was mounted after all!

Going to /media/cdrom with Nautilus presents an binary file named Dilbert. It's type is unknown and size unknown also. Permissions reports that "The permissions of "dilbert" could not be determined"

Trying to scan /media/cdrom using a console:

ls -al /media/cdrom
ls: cannot access /media/cdrom/.: Permission denied
ls: cannot access /media/cdrom/..: Permission denied
ls: cannot access /media/cdrom/dilbert: Permission denied
total 0
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
?????????? ? ? ? ? ? dilbert

Trying with sudo:

sudo ls -al /media/cdrom
[sudo] password for petar:
total 8
dr--r--r-- 3 4294967295 4294967295 96 2005-09-27 18:28 .
drwxr-xr-x 3 root root 4096 2010-09-10 23:04 ..
dr--r--r-- 4 4294967295 4294967295 152 2005-08-21 12:26 dilbert

Going to root mode.

rpetar@aurora:~$ sudo -s
root@aurora:~# cd /media/cdrom/
root@aurora:/media/cdrom# ls
dilbert
root@aurora:/media/cdrom# cd dilbert/
root@aurora:/media/cdrom/dilbert# ls
Season 1 Season 2
root@aurora:/media/cdrom/dilbert# cd Season\ 1/
root@aurora:/media/cdrom/dilbert/Season 1# ls
Episode 101 - The Name.avi Episode 104 - The Takeover.avi Episode 107 - Tower of Babel.avi Episode 110 - Y2K.avi Episode 113 - The Infomercial.avi
Episode 102 - The Competition.avi Episode 105 - Testing.avi Episode 108 - The Little People.avi Episode 111 - Charity.avi
Episode 103 - The Prototype.avi Episode 106 - Elbonian Trip.avi Episode 109 - The Knack.avi Episode 112 - Holiday.avi
root@aurora:/media/cdrom/dilbert/Season 1# cp Episode\ 101\ -\ The\ Name.avi /home/petar/Desktop/
cp: reading `Episode 101 - The Name.avi': Input/output error
root@aurora:/media/cdrom/dilbert/Season 1# cp Episode\ 107\ -\ Tower\ of\ Babel.avi /home/petar/Desktop/

The file is copied as it should be.

Unmounting the volume fails:

root@aurora:/media/cdrom/dilbert/Season 1# umount /media/cdrom
umount: /media/cdrom: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

Now ejecting the DVD disk and inserting another one does not work, because the next disk is not auto-mounted anymore, probably because of the umount failure.

And last for this first part of this report this is what my /etc/fstab looks like:

proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda6 during installation
UUID=6f239c9b-4981-4bbf-839d-b531b41b154c / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=499adc99-43f9-4c91-9768-9e4d13dac1f0 /boot ext4 defaults 0 2
# /home was on /dev/sda7 during installation
UUID=a18542eb-e3ce-4b4f-af52-843c2e18f027 /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=1634264c-dd51-435d-b358-4bf0b4d446a0 none swap sw 0 0
/dev/scd0 /media/cdrom udf,iso9660 user,noauto,exec,utf8 0 0

I added the last line myself consulting another Maverick user because it was present on his system, but his installation was an upgrade from Lucid while my system is a clean Maverick installation done by using the ubuntu-10.10-beta-alternate-i386.iso installed on a USB startup disk. I'm mentioning this because I believe if the installation was done using an installation CD instead of USB stick, this line would have been added to my /etc/fstab too (but I'm not sure about this).

I think that it's also important to mention this:
This disk was not accessible in Lucid too!
I am not talking about just one UDF DVD that is not accessible, but something like 15-20 UDF formated DVDs!
The DVDs are not mine but I know they are all created on a Windows XP machine and probably by Nero.
The reason I'm reporting this bug is because this DVDs WERE READABLE on some of the previous versions of Ubuntu. I can't be sure about the specific version, but I think I could read them when I was using Ubuntu 9.04 (or it might have been Ubuntu 9.10)
And most importantly, Maverick CAN MOUNT some UDF formated DVDs properly!!!

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gvfs 1.6.3-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-20.29-generic 2.6.35.4
Uname: Linux 2.6.35-20-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Sat Sep 11 05:44:57 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100831.2)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gvfs
Symptom: storage
Title: Documents cannot be opened in desktop UI on storage device

Revision history for this message
Petar Velkovski (pvelkovski) wrote :
summary: - Documents cannot be opened in desktop UI on storage device
+ Nautilus fails to mount some UDF DVDs properly
Revision history for this message
Petar Velkovski (pvelkovski) wrote : Re: Nautilus fails to mount some UDF DVDs properly
Download full text (6.8 KiB)

Now I'm trying to mount an UDF formated DVD that is mounted properly. It is and purchased DVD Video disk. This time everything works as expected. The disk is mounted and I'm presented with an window asking me what action I want take next. The default is to open Movie Player.

dmesg output:
...
[ 210.525173] UDF-fs: Partition marked readonly; forcing readonly mount
[ 210.550422] UDF-fs INFO UDF: Mounting volume 'DVDVolume', timestamp 2036/02/07 12:58 (1078)

petar@aurora:~$ cat /etc/mtab
/dev/sda6 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
/dev/sda1 /boot ext4 rw,commit=0 0 0
/dev/sda7 /home ext4 rw,commit=0 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
gvfs-fuse-daemon /home/petar/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=petar 0 0
/dev/sr0 /media/cdrom udf ro,nosuid,nodev,utf8,user=petar 0 0

Some forums state that there are different UDF format versions. I've read complaints that say that UDF formated DVDs created with Vista are not accessible under Linux/Ubuntu (as Vista uses some specific UDF format). I don't remember where, but one guy was claiming that newer UDF formats store some permission settings and that's why some tweaks have to be made in /etc/fstab have to be made in order to make this kind of UDF DVDs accesible to normal users (instead of only to the root user???) I find this an important hint for where to look for when trying to fix this bug, moreover because I tried accessing the previous mentioned DVDs with the last line in /etc/fstab removed (as it was on a cleanly installed Maverick). I'm getting the same end results, and the only deference is that when the line is removed, the system mounts the DVDs in some other directory.

This is what i get when I remove the line and insert another UDF DVDs that is inacessible.

dmesg

...
[ 87.355470] UDF-fs: Partition marked readonly; forcing readonly mount
[ 87.387023] UDF-fs INFO UDF: Mounting volume '071014_1703', timestamp 2007/10/14 16:03 (1078)

petar@aurora:~$ cat /etc/mtab
/dev/sda6 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
none /dev devtmpfs rw,mode=0755 0 0
none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
none /dev/shm tmpfs rw,nosuid,nodev 0 0
none /var/run tmpfs rw,nosuid,mode=0755 0 0
none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
/dev/sda1 /boot ext4 rw,commit=0 0 0
/dev/sda7 /home ext4 rw,commit=0 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0...

Read more...

Revision history for this message
Petar Velkovski (pvelkovski) wrote :

Also I would like to add that I reported this bug yesterday, but against Nautilus. It was marked invalid because of insufficient data and because it wasn't reported properly. It's Bug #634668. I hope this time I made it properly :)

summary: - Nautilus fails to mount some UDF DVDs properly
+ [Maverick] Nautilus fails to mount some UDF DVDs properly
Revision history for this message
Sebastien Bacher (seb128) wrote : Re: [Maverick] Nautilus fails to mount some UDF DVDs properly

did you read the other bug comment? did you use "ubuntu-bug storage"?

Revision history for this message
Martin Pitt (pitti) wrote :

With one of the failing DVDs inserted and mounted, please give me the output of

  ls -ld /media/cdrom*
  sudo ls -l /media/cdrom*
  sudo blkid -p /dev/sr0
  sudo /lib/udev/cdrom_id --debug /dev/sr0

Thanks!

affects: gvfs (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Petar Velkovski (pvelkovski) wrote :
Download full text (4.8 KiB)

@Sebastien Bacher

Yes I did read the other bug comment. The think is there are sub options presented once you choose" ubuntu-bug storage". After reading the comment and before i realized that the files are after all accessible but not in Nautilus, i tried reporting the bug choosing "Removable storage is not mounted automatically". The report that was created contained multiple files and proposed "linux" as Binary package hint. Unfortunately launchpad was down and i couldn't submit the report. in the mean time I realized that on the contrary the storage IS MOUNTED so next time i tried to report the bug I used "Documents cannot be opened in desktop UI on storage device". I think that it is a good explanation for the problem I'm having. But also "No permission to access files on storage device" might be a valid description too. So please don't accuse me of stupidity to follow simple instructions (that might me incomplete).

@Martin Pitt

petar@aurora:~$ ls -ld /media/cdrom*
drwxr-xr-x 2 root root 4096 2010-09-10 03:58 /media/cdrom
petar@aurora:~$ sudo ls -l /media/cdrom*
[sudo] password for petar:
total 0
petar@aurora:~$ sudo blkid -p /dev/sr0
/dev/sr0: LABEL="050927_1924" TYPE="udf" USAGE="filesystem"
petar@aurora:~$ sudo /lib/udev/cdrom_id --debug /dev/sr0
main: probing: '/dev/sr0'
cd_inquiry: INQUIRY: [ASUS ][DRW-2014S1 ][1.01]
cd_profiles: GET CONFIGURATION: size of features buffer 0x014c
cd_profiles: GET CONFIGURATION: feature 'profiles', with 14 entries
feature_profiles: profile 0x15 <ignored>
feature_profiles: profile 0x16 <ignored>
feature_profiles: profile 0x2b dvd_plus_r_dl
feature_profiles: profile 0x1b dvd_plus_r
feature_profiles: profile 0x1a dvd_plus_rw
feature_profiles: profile 0x14 dvd_rw
feature_profiles: profile 0x13 dvd_rw
feature_profiles: profile 0x12 dvd_ram
feature_profiles: profile 0x11 <ignored>
feature_profiles: profile 0x10 dvd_rom
feature_profiles: profile 0x0a cd_rw
feature_profiles: profile 0x09 cd_r
feature_profiles: profile 0x08 cd_rom
feature_profiles: profile 0x02 <ignored>
cd_profiles: GET CONFIGURATION: feature 0x0001 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0002 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0003 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0004 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0010 <ignored>, with 0x08 bytes
cd_profiles: GET CONFIGURATION: feature 0x001d <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x001e <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x001f <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0020 <ignored>, with 0x0c bytes
cd_profiles: GET CONFIGURATION: feature 0x0021 <ignored>, with 0x08 bytes
cd_profiles: GET CONFIGURATION: feature 0x0023 <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x0024 <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x0026 <ignored>, with 0x00 bytes
cd_profiles: GET CONFIGURATION: feature 0x002a <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feature 0x002b <ignored>, with 0x04 bytes
cd_profiles: GET CONFIGURATION: feat...

Read more...

Revision history for this message
Petar Velkovski (pvelkovski) wrote :

@Martin Pitt

With DVD-rom entry removed from /etc/fstab (remember when I installed Maverick it wasn't there by default, I added it later hoping it might somehow help), the disk is not mounted to /media/cdrom but /media/"disk_label_or_something"

petar@aurora:/$ dmesg
.....
[15309.596485] UDF-fs: Partition marked readonly; forcing readonly mount
[15309.634484] UDF-fs INFO UDF: Mounting volume '050927_1924', timestamp 2005/09/27 18:28 (1078)

petar@aurora:/$ cat /etc/mtab
...
/dev/sr0 /media/050927_1924 udf ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,iocharset=utf8,umask=0077 0 0

So your commands against /media/050927_1924 are:

petar@aurora:/$ ls -ld /media/050927_1924*
dr-------- 3 petar petar 96 2005-09-27 18:28 /media/050927_1924
petar@aurora:/$ sudo ls -l /media/050927_1924*
total 2
dr-------- 4 petar petar 152 2005-08-21 12:26 dilbert
petar@aurora:/$ sudo ls -l /media/050927_1924/dilbert
total 4
dr-------- 2 petar petar 1328 2005-08-12 01:55 Season 1
dr-------- 2 petar petar 1732 2005-08-15 03:49 Season 2
sudo ls -l /media/050927_1924/dilbert/Season\ 1/
total 1753514
-r-------- 1 petar petar 137267200 2005-08-12 01:46 Episode 101 - The Name.avi
-r-------- 1 petar petar 137328640 2005-08-12 01:47 Episode 102 - The Competition.avi
-r-------- 1 petar petar 138020864 2005-08-12 01:48 Episode 103 - The Prototype.avi
-r-------- 1 petar petar 138024960 2005-08-12 01:48 Episode 104 - The Takeover.avi
-r-------- 1 petar petar 138162176 2005-08-12 01:49 Episode 105 - Testing.avi
-r-------- 1 petar petar 137795584 2005-08-12 01:50 Episode 106 - Elbonian Trip.avi
-r-------- 1 petar petar 138016768 2005-08-12 01:51 Episode 107 - Tower of Babel.avi
-r-------- 1 petar petar 138381312 2005-08-12 01:52 Episode 108 - The Little People.avi
-r-------- 1 petar petar 138463232 2005-08-12 01:53 Episode 109 - The Knack.avi
-r-------- 1 petar petar 138506240 2005-08-12 01:53 Episode 110 - Y2K.avi
-r-------- 1 petar petar 138577920 2005-08-12 01:54 Episode 111 - Charity.avi
-r-------- 1 petar petar 138637312 2005-08-12 01:55 Episode 112 - Holiday.avi
-r-------- 1 petar petar 138416128 2005-08-12 01:56 Episode 113 - The Infomercial.avi

Or something weard:

petar@aurora:/$ ls -l /media/050927_1924
ls: cannot access /media/050927_1924/dilbert: Permission denied
total 0
?????????? ? ? ? ? ? dilbert

So please be sure that you gave the right commands

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Maverick] Does not show UDF contents

Thanks. So this seems to be a problem with the UDF file system driver then. Reassigned to the kernel.

summary: - [Maverick] Nautilus fails to mount some UDF DVDs properly
+ [Maverick] Does not show UDF contents
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Petar Velkovski (pvelkovski) wrote :

ANd i forgot to mention that I noticed that just for a split second, if Nautilus is open with the Places Side Pane an icon of mounted DVD appears and instantly disappears, and I think it's labeled with the number given above - 050927_1924.

Revision history for this message
Martin Pitt (pitti) wrote :

Right, in your second case it seems that the kernel driver applies way too strict permissions -- the directories are not executable, thus you can't change into them.

Revision history for this message
RomanIvanov (ivanov-jr) wrote :

Workaround to support UDF and ISO in the same time, and auto mount:

sudo mkdir /media/cdrom0
sudo gedit /etc/fstab

add to the end of file:

/dev/scd0 /media/cdrom0 udf,iso9660 users,noauto,uid=0,gid=46,mode=0777,dmode=0777,nosuid,noexec 0 0

Restart PC or "mount /dev/scd0"

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Ubuntu 10.04 LTS also doesn't read some DVD's with UDF filesystem, I have this problem with Ubuntu 10.04.1 fully up to date at year 2011, also original bugreporter also confirmed, that same problem with UDF DVD's exists on Ubuntu Lucid, see:
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/634668/comments/2

summary: - [Maverick] Does not show UDF contents
+ [Maverick, Lucid] Does not show UDF contents
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : Re: [Maverick, Lucid] Does not show UDF contents

I can confirm, than workaround with adding "mode=0777,dmode=0777" mount options in fstab works fine, but it would be nice to add real fix to udev/udisks/hal (I don't know who now automounts DVD devices...).
Maybe someone could tell where I can change default mount options for automount? In Ubuntu 10.04 I found only /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi file, but it seems this file isn't for changing default mount options, also AFAIK HAL is deprecated...

RomanIvanov wrote :
> Workaround to support UDF and ISO in the same time, and auto mount:
> sudo gedit /etc/fstab
> /dev/scd0 /media/cdrom0 udf,iso9660 users,noauto,uid=0,gid=46,mode=0777,dmode=0777,nosuid,noexec 0 0

Revision history for this message
systemhealer (system-healer) wrote :

The workaround has no effect in my clean maverick install. The same DVD mounts just fine in my 10.04 install (without a workaround).

Revision history for this message
Dariem Pérez Herrera (dariemp) wrote :

Maybe related with bug #10550? Kind of old bug... don't you guys think so?

Revision history for this message
Dariem Pérez Herrera (dariemp) wrote :

I've made the workaround into a patch for udisk on Lucid, and it solved the issue for me, but may need some testing. Attached patch 16-fix-default-udf-options.patch

Revision history for this message
Andy Whitcroft (apw) wrote :

Ok I have a look at the kernel code to see how this implements permissions. For these later formats the permissions are encoded on the disk. As the semantics of UDF style permissions are very unix like they are pretty much direct mapped into real system permisions from the on disk format. This implies the disk has 'r' but not 'x' set on the directories in question. Looking at the UDF specification (http://www.osta.org/specs/pdf/udf260.pdf) it does appear that we are implementing the permissions correctly:

  The Execute bit for a directory, sometimes referred to as the search bit, has
  special meaning. This bit enables a directory to be searched, but not have its
  contents listed. For example assume a directory called PRIVATE exists which
  only has the Execute permission and does not have the Read permission bit set.
  The contents of the directory PRIVATE can not be listed. Assume there is a file
  within the PRIVATE directory called README. The user can get access to the
  README file since the PRIVATE directory is searchable.

  To be able to list the contents of a directory both the Read and Execute
  permission bits must be set for the directory. To be able to create, delete and
  rename a file or subdirectory both the Write and Execute permission bits must be
  set for the directory. To get a better understanding of the Execute bit for a
  directory reference any UNIX book that covers file and directory permissions.
  The rules defined by the Execute bit for a directory shall be enforced by all
  implementations. The exception to this rule applies to Macintosh
  implementations. A Macintosh implementation may ignore the status of the Read
  bit in determining the accessibility of a directory

At a base level it appears that we are indeed doing what is expected at the kernel level. The disk does not want anyone to look in any of its directories. Clearly this is a non-sensible permissions setup on read-only media where it cannot be rectified.

As has been pointed out in previous comments there are knobs in the mount which allow these permissions to be overridden. It might be appropriate to use dmode to override these permissions on mount, perhaps only for read-only mounts of removable media. I believe that this is best handled in userspace.

Martin Pitt (pitti)
affects: linux (Ubuntu) → udisks (Ubuntu)
Changed in udisks (Ubuntu):
status: Confirmed → Triaged
tags: added: patch
Martin Pitt (pitti)
Changed in udisks (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I discussed that with upstream (David Zeuthen) now, and we agreed to adding this quirk to udisks: if we find an UDF file system on a read-only CD/DVD medium, we'll add dmask=500 to the mount options.

I now created a test CD with udf and a 0400 directory for testing this.

summary: - [Maverick, Lucid] Does not show UDF contents
+ Ignore broken directory permissions on UDF media
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in udisks (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udisks - 1.0.2-3+ubuntu1

---------------
udisks (1.0.2-3+ubuntu1) natty; urgency=low

  Upload current packaging git head to Natty.

  * 02-defer_smart_probing.patch: Try SMART probing again repeatedly while the
    daemon is inhibited. (LP: #580112)
  * Add 00git-udf-permissions.patch: Ignore broken directory permissions on
    UDF when they are on readonly CD media. (LP: #635499)
  * debian/control: Improve package description. Thanks Justin B Rye!
    (Closes: #614146)
  * debian/control: Explain in the package description why udisks
    recommends/suggests file system creation/admin tools. (Closes: #595114)
 -- Martin Pitt <email address hidden> Mon, 28 Feb 2011 13:18:20 +0100

Changed in udisks (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
m0sia (m0sia) wrote :

The same bug in Natty(with udisks 1.0.3-4ubuntu1)

the following workaround works for me:
> Workaround to support UDF and ISO in the same time, and auto mount:
> sudo gedit /etc/fstab
> /dev/scd0 /media/cdrom0 udf,iso9660 users,noauto,uid=0,gid=46,mode=0777,dmode=0777,nosuid,noexec 0 0

Revision history for this message
Forage (forage) wrote :

Ubuntu 11.10 still has the same issue.

Revision history for this message
^rooker (rooker) wrote :

I just ran into this issue on Precise Pangolin (12.04 LTS), updated to the latest packages.
udisks package is: "1.0.4-5ubuntu2", but I still had to use the fstab-0777-mode-workaround to access the disk.

Revision history for this message
bcsi (frank-bcsi) wrote :

Mint 15 as well.

udisks1.0.4-7build1

Revision history for this message
Fuujuhi (fuujuhi) wrote :

I have Ubuntu Precise 12.04, with udisks 1.0.4-5ubuntu2.1.

This version contains the patch that sets mount option 'dmode=0500' for UDF discs.

However this patch does not work for DVD-RW that are not finalized (However I don't know if finalization makes a difference).

Not finalizing DVD-RW is handy because it allows to burn e.g. several TV broadcasts on the same DVD-RW in several times. In my case I have a Sony DVD recorder, and apparently this recorder does not set correctly the directory permissions. Because of this, and because the patch above does not apply, I cannot read the DVD-RW on my ubuntu pc.

I looked at several ways to overcome this issue. First there is apparently no way to override the default mount options in udisks. At least, this is not clearly documented. My only resort then was to patch the udisks package directly. I join in attachment a patch on udisks 1.0.4-5ubuntu2.1. Basically the patch forces 'dmode=0500' for all optical discs with UDF filesystem.

(See http://www.cyberciti.biz/faq/rebuilding-ubuntu-debian-linux-binary-package/ for instruction on how to rebuild a package)

Revision history for this message
Fuujuhi (fuujuhi) wrote :

Also, a better patch might be to always set 'dmode=0500' for UDF filesystem. This would be similar to what is done apparently for iso9660 file system (see src/device.c, line 5922). See alternate patch in attachement.

Revision history for this message
Stefan Fleischmann (sfleischmann) wrote :

Apparently this patch never made it into udisks2 and therefore shows up again in Ubuntu 14.04 and later.

Revision history for this message
Phillip Susi (psusi) wrote :

What are the full mount options that your disc is mounted with? It should include uid=yourid, which causes the UDF filesystem driver to map the id ( -1 ) to be mapped to your UID, not the previously mentioned dmode=.

Changed in udisks2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel Gimpelevich (daniel-gimpelevich) wrote :

This is still a problem in xenial.

Changed in udisks2 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel Gimpelevich (daniel-gimpelevich) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.