LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permissions with DVD-RAM (https://www.linuxquestions.org/questions/linux-newbie-8/permissions-with-dvd-ram-789254/)

heberg21 02-15-2010 10:30 AM

Permissions with DVD-RAM
 
Hello,

I have an Ubuntu 9.10 x86-64 desktop system with a multi-recorder optical drive that supports DVD-RAM.

When I login as root and I insert a DVD-RAM disk (with data) it mounts normally as a any other disk. The problem I am having is that when I login as normal user (an admin user) I do not have permission to even read the content, and thus, it does not automount. How can I fix this? Thanks in advance.

irmin 02-15-2010 10:38 AM

Perhaps the DVD is mounted with a wrong umask or uid/gid values. Try the following:

Code:

umount /dev/<your dvd-device>
mount /dev/<your dvd-device> /mnt -o umask=0777

or
Code:

umount /dev/<your dvd-device>
mount /dev/<your dvd-device> /mnt -o uid=<your uid>,gid=<your gid>

<your dvd-device> should be sr0 in most modern cases. In the last case you will be the owner of all files on the disk, which the former commands will not clear the permissions for the files.

heberg21 02-15-2010 10:48 AM

Quote:

Originally Posted by irmin (Post 3864498)
Perhaps the DVD is mounted with a wrong umask or uid/gid values. Try the following:

Code:

umount /dev/<your dvd-device>
mount /dev/<your dvd-device> /mnt -o umask=0777

or
Code:

umount /dev/<your dvd-device>
mount /dev/<your dvd-device> /mnt -o uid=<your uid>,gid=<your gid>

<your dvd-device> should be sr0 in most modern cases. In the last case you will be the owner of all files on the disk, which the former commands will not clear the permissions for the files.

I am not sure how to get my gid or uid (?). Moreover, it works fine when I put a CD-ROM or a DVD movie disk in, this issue is only happening with DVD-RAM and DVD+RW discs.

irmin 02-15-2010 11:09 AM

uid=user id, gid=group id. They can also be replaced by symbolic names.

Try the following:
Insert the disk.
Get root and unmount the disk: "umount /dev/sr0"
Then mount it by trying "mount /dev/sr0 /mnt -o uid=<your-login-name>,gid=users"
Open a shell and try to access /mnt. If you can, then the problem is due to wrong mount parameters.
If not, try to post some lines of the output of "ls -l /mnt" (the filenames can be removed, if you do not want to show them here).

heberg21 02-15-2010 11:22 AM

Quote:

Originally Posted by irmin (Post 3864536)
uid=user id, gid=group id. They can also be replaced by symbolic names.

Try the following:
Insert the disk.
Get root and unmount the disk: "umount /dev/sr0"
Then mount it by trying "mount /dev/sr0 /mnt -o uid=<your-login-name>,gid=users"
Open a shell and try to access /mnt. If you can, then the problem is due to wrong mount parameters.
If not, try to post some lines of the output of "ls -l /mnt" (the filenames can be removed, if you do not want to show them here).

This time I was able to access it through /mnt, but now the dilemma is how to get it to mount as a normal optical disk, automatically upon insertion, without having to issue any commands.
Currently my /etc/fstab has this:
/dev/sr0 /media/cdrom0 user,udf,iso9660 user,noauto,exec,utf8 0 0

irmin 02-15-2010 01:15 PM

Make the options permanent:
Code:

/dev/sr0 /media/cdrom0 user,udf,iso9660 user,noauto,exec,utf8,uid=<your login>,gid=users,umask=0666 0 0
You can probably omit uid=...,when specifying umask

heberg21 02-15-2010 02:50 PM

Quote:

Originally Posted by irmin (Post 3864672)
Make the options permanent:
Code:

/dev/sr0 /media/cdrom0 user,udf,iso9660 user,noauto,exec,utf8,uid=<your login>,gid=users,umask=0666 0 0
You can probably omit uid=...,when specifying umask

I tried the above and still did not work, but then changed it to:
Code:

/dev/sr0      /media/cdrom0  udf,iso9660 user,noauto,exec,utf8,gid=cdrom 0      0
And that did the trick.
Thank you very much, you pointed me in the right direction.


All times are GMT -5. The time now is 12:12 AM.