You are not logged in.

#1 2017-11-27 17:15:42

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

[Solved] DVD Contents Are Locked, Can Only View As Root

Running Arch LTS w/XFCE. I pretty much never use DVD's, but I recently received a product catalog in DVD form from one of my suppliers.  When I open the contents in Thunar, all of the items are locked (contents are mostly photos & pdfs).  I can run Thunar as root to view and copy everything, but then the items are still locked (owned by root) when copied. Am I missing something in my user groups that is preventing my from viewing DVD contents as a normal user?  I'm added in the Optical & Storage groups, and this is where I'm confused.  Accessing the files as a user should just work correct? Here are my groups:

[cn@ArchOptiplex7010 ~]$ groups cn
wheel network audio optical storage power autologin chrome-remote-desktop users

I'm sure most will read this as a very stupid question, but aside from just changing the permissions on the files, I'm more looking to just make accessing these items as a normal user without having to run Thunar as root or chown each file independently. I'm not sure what I don't have set up properly to make that action happen.

Last edited by Annoyingduck (2017-11-29 15:31:08)

Offline

#2 2017-11-27 19:17:04

chowbok
Member
Registered: 2017-11-27
Posts: 20

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

It's a polkit issue. It seems to crop up when there's an entry for the DVD in fstab. Simplest solution is just to remove the fstab entry if you're always going to be accessing DVDs from your file manager. More complicated solution is to fix your polkit rules. See https://wiki.archlinux.org/index.php/Polkit, and https://github.com/coldfix/udiskie/wiki/Permissions for an example of polkit configuration.

Offline

#3 2017-11-27 21:00:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,403

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

These groups might also break polkit/logind integration, if you remove yourself from all of them save for users wheel and chrome-remote-desktop does it start to work?

Offline

#4 2017-11-28 15:49:24

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

chowbok wrote:

It's a polkit issue. It seems to crop up when there's an entry for the DVD in fstab. Simplest solution is just to remove the fstab entry if you're always going to be accessing DVDs from your file manager. More complicated solution is to fix your polkit rules. See https://wiki.archlinux.org/index.php/Polkit, and https://github.com/coldfix/udiskie/wiki/Permissions for an example of polkit configuration.

I don't have an entry in my fstab for the optical drive.  Only have for my boot, home, swap, and Windows partitions.  The polkit rules linked seem to target udiskie, I've always used udisk(2). Does udiskie need to be installed (which I actually don't like, I've gotten several drive conflicts using it in the past)?

Offline

#5 2017-11-28 17:04:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

Bear in mind that UDF supports POSIX file owners/permissions (unlike iso9660)
How exactly do you mount the disc of what filesystem and what's the corresponding entry in the output of "mount"?

Offline

#6 2017-11-28 17:21:24

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

seth wrote:

Bear in mind that UDF supports POSIX file owners/permissions (unlike iso9660)
How exactly do you mount the disc of what filesystem and what's the corresponding entry in the output of "mount"?

For mounting I use the default XFCE options which relies on udisks2.  For the optical I just accessed it through Thunar.  Here's my "mount" output (the last entry is the DVD that's mounted in the optical drive):

[cn@ArchOptiplex7010 ~]$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4040848k,nr_inodes=1010212,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda5 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
configfs on /sys/kernel/config type configfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
/dev/sda2 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /mnt/500GB Storage type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096,x-gvfs-show)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=809476k,mode=700,uid=1000,gid=100)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
/dev/sr0 on /run/media/cn/Magnate 2016 Catalog type udf (ro,nosuid,nodev,relatime,uid=1000,gid=100,iocharset=utf8,uhelper=udisks2)

Last edited by Annoyingduck (2017-11-28 17:22:32)

Offline

#7 2017-11-28 17:56:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

Check the owner of the file you want to read, if it's root (or anything but uid 1000), mount like a man and try passing "umask=0000" ;-)

Offline

#8 2017-11-28 18:06:03

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

seth wrote:

Check the owner of the file you want to read, if it's root (or anything but uid 1000), mount like a man and try passing "umask=0000" ;-)

The owner is actually not root, it's me, but as read only (even though I actually can't read anything without opening it as root). I honestly don't know what you even said smile What do you mean by mount like a man (manual?) and passing umask-0000?  I don't normally access files through the terminal, I'm typically gui unless i'm editing a file where I know where it is. I'm not a mounting/permissions expert, private use linux user where default configs typically just work for me.

Offline

#9 2017-11-28 18:11:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

There must be a reason why "all of the items are locked"

sudo stat /path/to/disk/some_file

Yes, the idea is to mount manually and pass "umask=0000" as an option (what should kill all permissions on the mounted media), so even if it 600 and owned by root, you should have read access to it.

Offline

#10 2017-11-28 18:17:55

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

seth wrote:

There must be a reason why "all of the items are locked"

sudo stat /path/to/disk/some_file

Yes, the idea is to mount manually and pass "umask=0000" as an option (what should kill all permissions on the mounted media), so even if it 600 and owned by root, you should have read access to it.

Ok, so the name of the disk is "Magnate 2016 Catalog".  It appears to be mounted in /run/media/cn/Magnate 2016 Catalog.  I ran a few configurations of the command (one with spaces, one with underscores, one without the disk name), here's the output:

[cn@ArchOptiplex7010 ~]$ sudo stat /run/media/cn/Magnate 2016 Catalog
[sudo] password for cn: 
stat: cannot stat '/run/media/cn/Magnate': No such file or directory
stat: cannot stat '2016': No such file or directory
stat: cannot stat 'Catalog': No such file or directory
[cn@ArchOptiplex7010 ~]$ sudo stat /run/media/cn/Magnate_2016_Catalog
stat: cannot stat '/run/media/cn/Magnate_2016_Catalog': No such file or directory
[cn@ArchOptiplex7010 ~]$ sudo stat /run/media/cn
  File: /run/media/cn
  Size: 60        	Blocks: 0          IO Block: 4096   directory
Device: 11h/17d	Inode: 38111       Links: 3
Access: (0750/drwxr-x---)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2017-11-28 13:14:28.453164555 -0500
Modify: 2017-11-28 12:18:38.933132477 -0500
Change: 2017-11-28 12:18:38.933132477 -0500
 Birth: -

Offline

#11 2017-11-28 18:24:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

you need to quote the name or escape the blanks with backspaces ...

Offline

#12 2017-11-28 18:27:38

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

seth wrote:

you need to quote the name or escape the blanks with backspaces ...

Ahh, that's how you do that...nice:

[cn@ArchOptiplex7010 ~]$ sudo stat /run/media/cn/"Magnate 2016 Catalog"
  File: /run/media/cn/Magnate 2016 Catalog
  Size: 808       	Blocks: 4          IO Block: 2048   directory
Device: b00h/2816d	Inode: 290         Links: 6
Access: (0555/dr-xr-xr-x)  Uid: ( 1000/      cn)   Gid: (  100/   users)
Access: 2017-10-12 00:04:43.000000000 -0400
Modify: 2017-10-12 00:04:43.000000000 -0400
Change: 2017-10-12 00:04:43.000000000 -0400
 Birth: -
[cn@ArchOptiplex7010 ~]$

Offline

#13 2017-11-28 19:26:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

This is a directory, owned by user "cn" and can be read and entered by anyone.
How is it "locked"?

Offline

#14 2017-11-28 19:31:40

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

seth wrote:

This is a directory, owned by user "cn" and can be read and entered by anyone.
How is it "locked"?

That's exactly what I'm trying to figure out.  I've never come across this before.  Anything I have that mounts in /run/media/cn (like a flash drive) mounts, reads, and writes just fine.  Is it possible there is some permission issue on the DVD itself?  Here's my view in Thunar:

https://imgur.com/36OARcj

Last edited by Annoyingduck (2017-11-28 19:39:05)

Offline

#15 2017-11-28 21:13:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

But "/run/media/cn/"Magnate 2016 Catalog" is the mount path, not one of the locked files or directories inside ...

Let's try this again:

stat "/run/media/cn/Magnate 2016 Catalog/FAQ.PDF"

Offline

#16 2017-11-28 21:15:59

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

seth wrote:

But "/run/media/cn/"Magnate 2016 Catalog" is the mount path, not one of the locked files or directories inside ...

Let's try this again:

stat "/run/media/cn/Magnate 2016 Catalog/FAQ.PDF"
[cn@ArchOptiplex7010 ~]$ stat "/run/media/cn/Magnate 2016 Catalog/FAQ.PDF"
  File: /run/media/cn/Magnate 2016 Catalog/FAQ.PDF
  Size: 102107    	Blocks: 200        IO Block: 2048   regular file
Device: b00h/2816d	Inode: 296         Links: 1
Access: (0444/-r--r--r--)  Uid: ( 1000/      cn)   Gid: (  100/   users)
Access: 2010-09-03 04:45:57.000000000 -0400
Modify: 2010-09-03 04:45:57.000000000 -0400
Change: 2010-09-03 04:45:57.000000000 -0400
 Birth: -
[cn@ArchOptiplex7010 ~]$ sudo stat "/run/media/cn/Magnate 2016 Catalog/FAQ.PDF"
[sudo] password for cn: 
  File: /run/media/cn/Magnate 2016 Catalog/FAQ.PDF
  Size: 102107    	Blocks: 200        IO Block: 2048   regular file
Device: b00h/2816d	Inode: 296         Links: 1
Access: (0444/-r--r--r--)  Uid: ( 1000/      cn)   Gid: (  100/   users)
Access: 2010-09-03 04:45:57.000000000 -0400
Modify: 2010-09-03 04:45:57.000000000 -0400
Change: 2010-09-03 04:45:57.000000000 -0400
 Birth: -
[cn@ArchOptiplex7010 ~]$

Offline

#17 2017-11-28 21:16:04

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

Doesn't the padlock icon just mean that the files are read-only which is to be expected?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#18 2017-11-28 21:18:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

I've no idea what icon that means, but the file is clearly readable.
He should be able to copy and open it (with a pdf viewer).

Offline

#19 2017-11-28 21:18:53

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

slithery wrote:

Doesn't the padlock icon just mean that the files are read-only which is to be expected?

So yes I can open them, but in order to do anything with the files I need to open as root.  I cannot copy the files/rename etc. from the DVD disk to my hard drive without root.

Offline

#20 2017-11-28 21:20:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

cp "/run/media/cn/Magnate 2016 Catalog/FAQ.PDF" ~/
stat ~/FAQ.PDF
cp "/run/media/cn/Magnate 2016 Catalog/FAQ.PDF" /tmp
stat /tmp/FAQ.PDF

Offline

#21 2017-11-28 21:41:02

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

Now I don't even know what to say. I just ran an update which updated only 3 packages which were Python related. I just rebooted the lock is still there, but I'm no longer getting the "cannot copy file" error I was getting before.  Files are opening and copying correctly. Root no longer required. Could it really have been a simple update to a python package?

Last edited by Annoyingduck (2017-11-28 21:41:31)

Offline

#22 2017-11-28 21:44:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,107

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

"pactree thunar", but I guess there's no python dependency...

Offline

#23 2017-11-28 21:47:44

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

Which packages?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#24 2017-11-29 03:08:52

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

slithery wrote:

Which packages?

Updated packages were: inxi, libmicrohttpd, and python-setuptools.  None of those should have impacted this action. I forgot to bring the DVD home, so tomorrow I'll test on some of my other machines. I have another Optiplex with a nearly identical Arch XFCE system as my work computer in question and it's a dual boot with Manjaro XFCE.  The Manjaro partition though hasn't been updated in a few months, but may come in use for tracking this down.

Offline

#25 2017-11-29 15:30:47

Annoyingduck
Member
Registered: 2016-08-02
Posts: 179

Re: [Solved] DVD Contents Are Locked, Can Only View As Root

Ok I'm going to mark this as solved.  The issue is apparently with the DVD itself. Today in work after turning on the computer I inserted the disk and got the same cannot copy error. Rebooting the machine with the DISK IN the optical drive then allows access to the files & copying works.  That must have been what I experienced yesterday.  How that is the case is another issue all together, but whatever it's working. I rebooted again and borrowed a different DVD data disk from another company, popped it in and it's working as expected - no need to boot with the disk in the optical drive. File contents still contain the lock, but this is apparently the default action of any data disk (having read only permissions). Google showed a multitude of possible reasons that a data DVD can have odd behavior, none of which I really care to solve, as I've gotten everything I needed off the disk.

So I'm calling this a corrupt DVD because another DVD is working as it should (aka, my system is fine). Thanks for everyone's help here, I now feel like I wasted a thread by not checking another DVD first, but I did not have one at the time.

Offline

Board footer

Powered by FluxBB