PDA

View Full Version : DVD mount permissions trouble



ptahlis
20th July 2004, 06:49 AM
I'm having some problems with mounting data DVDs created on a Windows machine. Although I'm a newbie, I have tried man mount, man fstab, and searching these forums for clues as to what I'm doing wrong, but haven't been able to figure it out.

Here's what's going on:

I have a laptop with a combo CD-RW/DVD+RW drive. Any CD I've tried to use so far has worked fine. I haven't tried DVD video yet. DVD data (read) works fine, but only if I am trying to access it as root. If I try as my normal user I get the following error: bash: cd: /mnt/cdrom: Permission denied

Here's the relevant line from my fstab file:

/dev/cdrom /mnt/cdrom udf,iso9660 noauto,users,kudzu,ro 0 0

Before I mount the drive the /mnt/cdrom permissions are:
dr--r--r-- 36 hansenc hansenc 3908 Jul 16 13:58 cdrom



and after mounting they are:
dr--r--r-- 36 4294967295 4294967295 3908 Jul 16 13:58 cdrom

Things I have tried:

After mounting the drive I have tried changing the permissions via chmod, but I get an error message because the filesystem is read only. If I remove the "ro 0 0" from fstab I can mount the drive (with an error message that basically states the device will be mounted read-only) and also successfully browse it as a user. BUT the long filename support (Rock Ridge/Joliet?)is no longer there, and I can't do without that. Permissions after such a mount operation look like this:

dr-xr-xr-x 1 root root 2048 Jul 16 07:58 cdrom

I have tried modifying the fstab entry by removing kudzu, and by inserting a uid= and gid= statement without achieving any success at all. In the end, I can use the DVD as I need to only as root. As a user I either get "permission denied" or I have to use 8.3 format filenames. I would appreciate any insight someone can offer as to how to fix this, and just as importantly (because I do want to learn) why it's acting this way in the first place.

Thanks,

ptahlis

davedave
20th July 2004, 07:24 AM
try changing "users" to "owner" in /etc/fstab

/dev/cdrom /mnt/cdrom udf,iso9660 noauto,users,kudzu,ro 0 0
************
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0

ptahlis
20th July 2004, 08:12 AM
try changing "users" to "owner" in /etc/fstab

/dev/cdrom /mnt/cdrom udf,iso9660 noauto,users,kudzu,ro 0 0
************
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0


Thanks for the reply. 'owner' was actually the original value in fstab. I had forgotten that I had made that change or I would have included that info in my post above. In any case, it didn't seem to affect the problem.

toto980213
7th July 2005, 09:00 PM
Hi all,
I have exactly the same problem on my FC3 (kernel 2.6.9-1.667smp, x86_64).

# mount -v -o uid=abarth,gid=users /media/cdrecorder/
mount: you didn't specify a filesystem type for /dev/hdc
I will try type udf
mount: block device /dev/hdc is write-protected, mounting read-only
/dev/hdc on /media/cdrecorder type udf (ro,nosuid,nodev,uid=1301,gid=100)
# ls -ld /media/cdrecorder/
dr--r--r-- 10 abarth users 492 Jan 7 17:33 /media/cdrecorder/

User abarth has not the permission to traverse the directory /media/cdrecorder/ ("x" permission).
# ls -l /media/cdrecorder/
total 60
dr--r--r-- 26 abarth users 2704 Jan 5 2005 Med
[...]

But as a user abarth a cannot cd into any directory:
$ cd /media/cdrecorder/Med
bash: cd: /media/cdrecorder/Med: Permission denied

Even umask=7777 as mount option does not change anything.

Thanks for any help
Alex

SimonJW
8th July 2005, 12:17 PM
I've had this problem with MacOSX CD's, because it uses the rolling rock extention to preserve file permissions - for a different user ID! I can never read a mac OSX burt CD without going to root. I don't think Windows can do this with the Joliet extension, but the problem sounds similar.

Try these mount options uid=xxx (find your user ID from /etc/passwd), umask=0000 (not 7777 becuase umask is the permissions you want NOT to be set), and the option that disables rolling rock (norock, I think).

toto980213
8th July 2005, 07:41 PM
Hi Simon,
thanks for your response. I try your suggestions but unfortunately without success. When I mount the DVD as iso9660, any user can access the DVD but all filenames are stripped to 8 characters.


# mount -t iso9660 /dev/hdc /media/cdrecorder/
mount: block device /dev/hdc is write-protected, mounting read-only
# ls -l /media/cdrecorder/med/
total 1200
dr-xr-xr-x 1 root root 2048 Jan 5 2005 as864b~1
[..]


The mount options norock,nojoliet and map have no effect. The filenames are correct when I use filesystem "udf". This filesystem has no option controling the rock or joliet extention. The mount command I used is:



mount -t udf -v -o ro,uid=1301,gid=100,umask=0000 /dev/hdc /media/cdrecorder/
# ls -ld /media/cdrecorder/
dr--r--r-- 10 abarth users 492 Jan 7 17:33 /media/cdrecorder/
# ls -ld /media/cdrecorder/Med
dr--r--r-- 26 abarth users 2704 Jan 5 2005 /media/cdrecorder/Med


And still any non-root user cannot cd in the directory /media/cdrecorder/Med since execute permission are not set. Is this a bug/limituation of udf or my DVD (burned from Windows Nero or Roxio I can't remember) uses non-standard extentions ?

Cheers
Alex

CrazednDazed
2nd August 2005, 01:31 AM
Let me first say right now I have three FC3 machines (2.6.9-1.667) and they all have this problem. On this machine, both my cd and dvd drive mount and work fine, but after each reboot, the permissions for those two devices get reverted back to root. I would like the permissions to stay the way I set them, so I do not have to run k3b or grip as root in order to play/burn/rip cds! Basically, after every reboot, as root, I have to:

chown me.me /dev/hdc /dev/hdd

in order to use the drives with any program. I've looked into man chown, and chown --help, and tried just about every option, but none seem to have an effect. Is this a simple setting, or maybe I can set up a script to run chown while the computer is booting up? Thanks for any replies...

AMD Barton 2500+
1 GB DDR333
1 Lite-On CDRW
1 Lite-On DVD Drive
30 GB HD

fpoole
2nd August 2005, 02:03 AM
I have a problem with mounting permissions on some partitions on FC4. Maybe we need the same solution.

toto980213
3rd August 2005, 03:13 PM
Hi folks,

I noticed that the I have only this problem with DVD burned by Roxio. I didn't have this problem with DVD burned with Nero (under windows). In my case it seems to be a problem with the DVD.
For your problem, I checked the permission of hdc:

ls -ld /dev/hdc
brw------- 1 me disk 22, 0 Jul 18 06:20 /dev/hdc

It seems to be OK even after a reboot. But I don't kown where/when linux decides that I am the owner of /dev/hdc.

Alex

CrazednDazed
3rd August 2005, 04:13 PM
I'm not sure exactly what is going on, maybe a package conflict or something (although I haven't done any updates...).

ls -ld

returns a very similar line as the one above, but the owner is root after ever reboot.... Very mysterious.
Thanks

fpoole
3rd August 2005, 04:34 PM
Well, I know that in my case it just doesn't allow a non-root user to access /media/XP, nor does it let you chmod...presumably because I'm trying to read from (not write-to) NTFS. :/

CrazednDazed
3rd August 2005, 09:35 PM
fpoole -
I have mounted many a ntfs partition here on FC3, and the users can browse them. Try changing the ownership of the partition itself...

chown you.you /dev/hdd

Note hdd might not be the partition you're thinking about, but my users can browse ntfs so I know it's possible!