# [solved] DVD ROM doesn't exists for regular users

## HerrSchafer

Hi guys!

My notebook's optical drive (HP Pavilion g4) works properly for root (I'm able to browse files and read them), but thunar doesn't show even the CDROM's icon and media player cannot open a movie dvd.

I think it is because some kind of permission, but I'm lost.

/etc/fstab

```
/dev/sr0      /mnt/cdrom   auto      noauto,user,rw   0 0
```

I have created (mkdir) the /mnt/cdrom mount place. I don't know where I'm going wrong.

Thanks.

----------

## Hu

If you think it is a permission problem, then please show us the permissions that are currently used.  What happens if you use a shell running as a non-root user to browse the directory after it is mounted?

----------

## HerrSchafer

 *Hu wrote:*   

> If you think it is a permission problem, then please show us the permissions that are currently used.  What happens if you use a shell running as a non-root user to browse the directory after it is mounted?

 

How can I show it?

Nothing happens! The DVD simple doesn't exists for non root; if I launch thunar from terminal (as su) it is there; another instance as normal user at the same time still not seeing the DVD.

Thanks for answer me.

----------

## krinn

 *HerrSchafer wrote:*   

>  *Hu wrote:*   If you think it is a permission problem, then please show us the permissions that are currently used.  What happens if you use a shell running as a non-root user to browse the directory after it is mounted? 
> 
> How can I show it?

 

From what Hu said, he asked you to simply show result of :

```
ls -l /mnt/cdrom
```

Made using a non root user account.

----------

## i92guboj

This can be due to a number of things.

If it's just the GUI filemanager acting up it could be a consolekit issue. So, does it work if you use a DM such as gdm, kdm, lxdm or lightdm? Can you use udisksctl from command line to mount that device AS A USER?

In any case, posting the ls -l /dev/sr0 output would be a good start.

----------

## HerrSchafer

Sorry for the late. I have made a new install (I have made too many installs/uninstalls in the old one), and I installed lxde instead xfce. For my surprise, cdrom was working properly. PCMAN_FM was able to browse files at the optical disc as regular user

```
anselmo@chaosdevice ~ $ ls -l /mnt/cdrom

total 0

anselmo@chaosdevice ~ $ ls -l /dev/sr0

brw-rw---- 1 root cdrom 11, 0 Out  1 07:01 /dev/sr0

anselmo@chaosdevice ~ $ 

```

I noticed root in the output above; but I don't understand it very well. Root is the owner of device? I have included regular user into cdrom group.

@i92guboj: yes, I was using lightdm (now I've changed it to lxdm)

I really think lxde is too poor (and for this very reason, lightweight!), I'll now build my favorite DE and see if things works or not.

Thank you very much, guys, for your support!

----------

## i92guboj

Root is the owner, cdrom is the assigned group.

The permissions come in triplets in the form "rwxrwxrwx". In this case, "rw-rw----" means that this device node has read and write permissions for the owner and the group, and no permission for the rest of the users.

----------

## HerrSchafer

Understood!

Is this only because my /etc/fstab or may other configs change it?

----------

## i92guboj

That highly depend on how the system is configured.

But the norm nowadays is that, for removable drives, your fstab doesn't matter at all (in fact, having removables listed there will only cause trouble).

Today, most desktop environments will use consolekit and policykit to gain access to devices, and to be able to mount and unmount them. That is, unless you willingly disable consolekit and policykit, which is not a trivial thing. So, if you want to alter how you gain access to removable devices, you should be looking at the policykit auth rules, for example:

https://wiki.archlinux.org/index.php/Polkit#Authorization_rules

My rule of thumb is, by the time you need to worry about this crap, you should probably invest your time into disabling *kit. But that's just me.

----------

## HerrSchafer

I have already heard about disable *kits, but I'm just a crawling baby; to win Usain Bolt is another step... LOL

As soon as I install XFCE again I'll perform some tests to find out why thunar gives me the error that started this thread. If I understand what you saying, I'll be bound to change the rules' files. And that's what I'm afraid of: wrong rules can mess the whole system...

----------

## HerrSchafer

My nightmare has just begun!

I have installed XFCE and both Thunar and PCMANFM have the same behavior: do not show optical drive, as regular user; both has normal behavior when launched from terminal (root).

What is the next step?

_______________

I also noticed that some cursors don't change to icon set I choose; fonts and themes are correctly changed.

----------

## HerrSchafer

I have started dig into files and I have found this:

/usr/share/polkit-1/actions/org.freedesktop.udisks.policy

```
 <action id="org.freedesktop.udisks.filesystem-mount">

    <description>Mount a device</description>

    <message>Authentication is required to mount the device</message>

    <defaults>

      <allow_any>no</allow_any>

      <allow_inactive>no</allow_inactive>

      <allow_active>yes</allow_active>

    </defaults>

  </action>
```

Could it be the reason of my problem?

I also tried to add .rules file as wiki says:

/etc/polkit-1/rules.d/10-udisks.rules

```
polkit.addRule(function(action, subject) {

    if (action.id == "org.freedesktop.udisks2.filesystem-mount" &&

        subject.user == "anselmo") {

        return "yes";

    }

});
```

By the way, what is the difference between udisks and udisks2?

----------

## HerrSchafer

I have created rules for both udisks and udisks2 for filesystem-mount (and thunar doesn't work as it should); need I create rules for others events?

----------

## DaggyStyle

not sure if it is relevant anymore but are you sure you are in the cdrom group?

----------

## HerrSchafer

 *DaggyStyle wrote:*   

> not sure if it is relevant anymore but are you sure you are in the cdrom group?

 

YEP!

```
anselmo@pavilion ~ $ groups

wheel audio cdrom video usb users plugdev 
```

Thank you for answering! The problem still haunting me...

----------

## HerrSchafer

Finally the victory!

I have changed my /etc/fstab from this:

```
/dev/sr0      /mnt/cdrom   auto      noauto,user,rw   0 0
```

to this:

```
/dev/sr0      /media/cdrom   auto      users   0 0
```

and, of course, created the /media/cdrom dir.

Thunar only shows the optical disc when it has a media within and then everything goes as expected.

I would like to thank everyone that answered this thread.

----------

## RazielFMX

That is odd; users isn't valid.

From the fstab manpage:

```

       The fourth field (fs_mntops).

              This field describes the mount options associated with the filesystem.

              It is formatted as a comma separated list of options.  It contains at least the type of mount plus any additional options appropriate to the filesystem

              type. For documentation on the available mount options, see mount(8).  For documentation on the available swap options, see swapon(8).

              Basic file system independent options are:

              defaults

                     use default options: rw, suid, dev, exec, auto, nouser, and async.

              noauto do not mount when "mount -a" is given (e.g., at boot time)

              user   allow a user to mount

              owner  allow device owner to mount

              comment

                     or x-<name> for use by fstab-maintaining programs

              nofail do not report errors for this device if it does not exist.

```

----------

## Hu

It is valid, though apparently documented in mount(8) instead of fstab(5).

```
              Only the user that mounted a

              filesystem can unmount it again.  If any user should be able  to

              unmount  it,  then  use users instead of user in the fstab line.
```

----------

## HerrSchafer

 *RazielFMX wrote:*   

> That is odd; users isn't valid.
> 
> 

 

I have tested it, even after read what @Hu has said; it is valid and it works. I have other machine running gentoo and users works at both PCs.

Thank you anyway, for your cooperation.

----------

