You are not logged in.
Pages: 1
Due to recent system changes, I am no longer able to access /dev/sr0 through ssh. I previously had ripped cd's on a remote host through ssh -X, but now get an error unable to access /dev/sr0 and the drive doesn't spin up. VLC also has the same issue. It works when logged in to the machine locally.
I did make some changes to the system (created a nfs share, changed some ssfs mounts, edited fstab, etc), but I can't figure out what caused this or how to completely back out of all the changes at this point.
I am thinking it may have something to do with automounting, but I'm not clear on how this is supposed to work for an optical drive. Any ideas on where to look would be appreciated.
Thanks
Offline
Actual error messages please and also, in a problematic session:
stat /dev/sr0
idOffline
Thanks for your help
from Asunder
Error: Couldn't open /dev/sr0
from VLC
Playback failure:
DVDRead could not open the disc "/dev/sr0".
Your input can't be opened:
VLC is unable to open the MRL 'dvd:///dev/sr0'. Check the log for details.the detailed logs from vlc
core debug: creating demux: access='dvd' demux='any' location='/dev/sr0' file='/dev/sr0'
core debug: looking for access_demux module matching "dvd": 18 candidates
dvdnav warning: cannot open DVD (/dev/sr0)
dvdread error: DVDRead cannot open source: /dev/sr0
core debug: no access_demux modules matched
core debug: creating access 'dvd' location='/dev/sr0', path='/dev/sr0'
core debug: looking for access module matching "dvd": 23 candidates
core debug: no access modules matched
core error: open of `dvd:///dev/sr0' failedstat /dev/sr0
File: /dev/sr0
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device: 6h/6d Inode: 2147 Links: 1 Device type: b,0
Access: (0660/brw-rw----) Uid: ( 0/ root) Gid: ( 93/ optical)
Access: 2018-02-06 08:37:31.634028638 -0800
Modify: 2018-02-06 08:37:31.634028638 -0800
Change: 2018-02-06 08:37:31.634028638 -0800
Birth: -id
uid=1000(john) gid=1000(john) groups=1000(john),10(wheel),1001(staff)Last edited by jolew (2018-02-06 20:55:51)
Offline
a) please wrap the output in "code" tags (bbcode)
b) take a close look at the two outputs I asked for. Do you see why you can't access it?
Offline
a) Done!
b) Sorry. I don't understand. The outputs are the same as I get when logged in directly and able to access.
Offline
Offline
The device belongs to root:optical and can not be read (or written) by others and you're (of course) not root nor in the optical group.
Idk what you do as local user (might build on some polkit rule for local users), but there's no chance that this user (as represented by "id") can directly access that file.
Offline
@seth see /usr/lib/udev/rules.d/70-uaccess.rules
edit:
$ getfacl /dev/sr0
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: optical
user::rw-
user:testuser:rw-
group::rw-
mask::rw-
other::---Last edited by loqs (2018-02-06 21:18:24)
Offline
Here is output for me from remote. It looks like this is ok though.
getfacl /dev/sr0
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: optical
user::rw-
user:john:rw-
group::rw-
mask::rw-
other::---Offline
What is the output of `tail /dev/sr0` when logged in remotely with media present?
Offline
tail /dev/sr0
tail: error reading '/dev/sr0': Input/output errorOffline
Cross test: Add yourself to the optical group (ensure the update applied) and check again. Can you access the file now?
Offline
added to 'optical' group
id
uid=1000(john) gid=1000(john) groups=1000(john),10(wheel),93(optical),1001(staff)tried again same error
tail /dev/sr0
tail: error reading '/dev/sr0': Input/output errorOffline
Remove any disc from the device if there is one and try again.
Offline
Ok, my bad on the tail command output. I had an audio cd in so I guess that might have been the source of the error? I tried various disks and I did get an output from tail on some of them. I then tried after removing myself from 'optical' again and it is still working.
I put the original audio cd back in and it was read by asunder with no problem. The only thing I can think is that maybe getfacl sorted out an acl problem? I will try to reboot and recreate the scenario again later this evening to confirm.
Thanks for your help and I will update after trying to recreate.
Offline
I did more testing:
1. Restarting recreates the problem
2. Adding my user to 'optical' group gives access. This is a workable solution for me.
3. The acl is updating differently at different times. Now when I remove from optical group, it no longer works. The acl is different as well.
getfacl /dev/sr0
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: optical
user::rw-
group::rw-
other::---This time it doesn't include the line - user:john:rw-
I will do some more reading and testing to see if I can figure out why the acl is not updating correctly. Thanks again for your help.
Offline
Update:
The reason it started working was I was logged in locally as well as remotely. I don't run the system with a monitor so it was confusing. This means after every reboot I have to login locally (kind of a pain) or just add myself to the 'optical' group.
If it was just the cdrom, this would be a fix, however, I now realize it is probably causing me problems with remote sound as well. I have been struggling to set up pulseaudio networking and I am wondering if it is the same problem.
My question:
Where is the check for local/remote configured and is there any way to change the policy to allow remote access to specific hardware? I think it is under udev rules, but so far I am having difficulty in figuring out where.
Thanks
Offline
What do you use as ssh login? Maybe pam based authentication has to be part of the process in order to start a systemd-logind session that assigns the access rights.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Just ssh-keygen. I'll see if I can get an ssh agent up and running. I changed this recently while troubleshooting and I need to backtrack and upgrade security.
Thank you.
Offline
Pages: 1