[SOLVED] Eject command lacks permissions after upgrade to 15.1
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The device needs permissions. For me that's /dev/sr0.
I don't know how it works in openSUSE 15, but here the device files need to be in the group cdrom (and writable for the group) and I, myself, need to be in that group too to have those permissions.
This is the default in Slackware's "udev", but of course in openSUSE all that has been taken over by systemd, so I do not know what the defaults there are.
I did work before without any configuration on 15.0 and older.
The eject command works with a cdrom:
Code:
% eject -v
eject: using default device `/dev/sr0'
eject: device name is `/dev/sr0'
eject: /dev/sr0: not mounted
eject: /dev/sr0: is whole-disk device
eject: /dev/sr0: trying to eject using CD-ROM eject command
eject: CD-ROM eject command succeeded
But not as DVD:
Code:
eject: using default device `/dev/sr0'
eject: device name is `/dev/sr0'
eject: /dev/sr0: mounted on /run/media/neljor/openSUSE-Leap-15.1-DVD-x86_64470
eject: /dev/sr0: is whole-disk device
eject: /run/media/neljor/openSUSE-Leap-15.1-DVD-x86_64470: unmounting
umount: /run/media/neljor/openSUSE-Leap-15.1-DVD-x86_64470: umount failed: Operation not permitted.
eject: unmount of `/run/media/neljor/openSUSE-Leap-15.1-DVD-x86_64470' failed
What i notice is that the cdrom is not mounted, but functions fully.
And the dvd IS mounted but cannot be unmounted without root permission.
Code:
% groups
users cdrom
% ls -l /dev/sr0
brw-rw----+ 1 root cdrom 11, 0 Aug 28 09:56 /dev/sr0
[QUOTE=Brother77;6030200]Did the permissions changed after upgrade 15.0 -> 15.1?
Somehow the eject command is not suitable anymore, but just found that everything now is fully controlled by the device notifier,
mounting and ejecting of dvd's and cdroms. So i will give this a "problem solved" mark.
And the dvd IS mounted but cannot be unmounted without root permission.
So the problem is not with elect, but with umount, you don't have the privilege to UNmount a mounted disk on /dev/sr0, probably because it has been auto-mounted as root by something in your desktop environment. That would have been a showstopper too if it had been a CDrom. I never automount and my fstab has the "users" option in it so that every user is allowed to unmount CD's and/or DVD's:
Code:
/dev/dvd /mnt/dvd auto noauto,users,ro 0 0
/dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0
Note that I use symlinks, as I got two drives and I have got an external (double-layer writer) 3rd one, so I do not want to restrict it to physical device names.
/dev/dvd /mnt/dvd auto noauto,users,ro 0 0
/dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0
Note that I use symlinks, as I got two drives and I have got an external (double-layer writer) 3rd one, so I do not want to restrict it to physical device names.
Thank you kindly, will look further in to this.
In 15.0 ejecting was no problem the device notifier seems to have had a update that it now supports ejecting too with the disadvantage that the
eject command is unable to do its job as i used to do. So have to question if i want to go along with the new functionality of the device notifier
or make some lines in the fstab. Doesn't that need the exec option too? Which also make me question if it needs a 3rd line for writable disks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.