Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I decided to build my own gui (ubuntu server, openbox and stuff).

I am having a permissions problem with my cd drive. When I try to mount it with user privileges it tells me that I'm not allowed.

I can then mount it as root, and can see the content in the root window, but as a normal user i'm still not allowed to view the contents.

So my question here is, how can i configure it in a way that it mounts my cd/dvd's ALWAYS with my reading permissions?

sudo df -h :

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              19G  6.5G   12G  37% /
udev                  995M  4.0K  995M   1% /dev
tmpfs                 402M  528K  401M   1% /run
none                  5.0M     0  5.0M   0% /run/lock
none                 1004M  4.0K 1004M   1% /run/shm
/dev/sda4             420G  306G   92G  77% /home
/dev/sda5              20G   16K   20G   1% /windows
/dev/sr0              6.1G  6.1G     0 100% /media/BIOSHOCK
share|improve this question
add comment

2 Answers

The easiest thing is to add an entry to /etc/fstab like:

/dev/sr0       /media/cdrom       auto        noauto,owner,ro,users  0   0

Then you should be able to run

mount /media/cdrom

as a normal user. Alternatively, you can pass the uid= and gid= options to mount (when running under sudo) to tell mount who you want to own the mounted filesystem.

man mount

for more information.

share|improve this answer
    
the uid thing did the job. many thanks! –  spheniscida Mar 9 '12 at 21:50
add comment

seems like your permissions are not getting set correctly. Here is mine, to compare with yours. I see I do not have write access. May only be set when a writeable disk is inserted. The key is to have read access to 'world' since your user is not member or root group, like myself.

myname@ubuntu:~$ ll /dev/sr0 /media/cdrom0
brw-rw----+ 1 root cdrom 11, 0 2012-03-02 23:58 /dev/sr0

/media/cdrom0:
total 14
dr-xr-xr-x 1 root root 2048 2005-09-01 08:10 .
drwxr-xr-x 5 root root 4096 2012-02-16 22:21 ..
dr-xr-xr-x 1 root root 6144 2005-09-01 08:10 50 Bible Class Books (#1)
dr-xr-xr-x 1 root root 2048 2005-09-01 08:10 Bible Class Books (#2)

sudo chmod 555 /media/cdrom0 you shouldn't really need to do this, it ought to be automatic.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.