Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] DVD ROM doesn't exists for regular users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Tue Sep 30, 2014 2:56 am    Post subject: [solved] DVD ROM doesn't exists for regular users Reply with quote

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
Code:
/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.
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton


Last edited by HerrSchafer on Wed Oct 08, 2014 4:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23081

PostPosted: Tue Sep 30, 2014 3:27 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Tue Sep 30, 2014 11:10 am    Post subject: Reply with quote

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.
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Tue Sep 30, 2014 11:22 am    Post subject: Reply with quote

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 :
Code:
ls -l /mnt/cdrom

Made using a non root user account.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Tue Sep 30, 2014 11:27 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Wed Oct 01, 2014 1:52 pm    Post subject: Reply with quote

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

Code:
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!
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Oct 01, 2014 2:03 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Wed Oct 01, 2014 2:12 pm    Post subject: Reply with quote

Understood!

Is this only because my /etc/fstab or may other configs change it?
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Oct 01, 2014 2:51 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Wed Oct 01, 2014 4:41 pm    Post subject: Reply with quote

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...
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Wed Oct 01, 2014 11:50 pm    Post subject: Reply with quote

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.
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Mon Oct 06, 2014 1:33 pm    Post subject: Reply with quote

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

/usr/share/polkit-1/actions/org.freedesktop.udisks.policy
Code:
 <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
Code:
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?
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Tue Oct 07, 2014 1:05 pm    Post subject: Reply with quote

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?
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Wed Oct 08, 2014 2:37 pm    Post subject: Reply with quote

not sure if it is relevant anymore but are you sure you are in the cdrom group?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Wed Oct 08, 2014 2:59 pm    Post subject: Reply with quote

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


YEP!
Code:
anselmo@pavilion ~ $ groups
wheel audio cdrom video usb users plugdev


Thank you for answering! The problem still haunting me...
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Wed Oct 08, 2014 4:10 pm    Post subject: Reply with quote

Finally the victory!

I have changed my /etc/fstab from this:
Code:
/dev/sr0      /mnt/cdrom   auto      noauto,user,rw   0 0

to this:
Code:
/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.
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
RazielFMX
l33t
l33t


Joined: 23 Apr 2005
Posts: 835
Location: NY, USA

PostPosted: Wed Oct 08, 2014 4:55 pm    Post subject: Reply with quote

That is odd; users isn't valid.

From the fstab manpage:

Code:

       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.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23081

PostPosted: Thu Oct 09, 2014 1:50 am    Post subject: Reply with quote

It is valid, though apparently documented in mount(8) instead of fstab(5).
mount(8):
              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.
Back to top
View user's profile Send private message
HerrSchafer
Tux's lil' helper
Tux's lil' helper


Joined: 18 May 2011
Posts: 139

PostPosted: Fri Oct 10, 2014 8:59 pm    Post subject: Reply with quote

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.
_________________
“Long is the way, and hard, that out of hell leads up to light.”
― John Milton
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum