Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
08-23-2024, 02:11 PM
|
#1
|
Member
Registered: Oct 2022
Posts: 78
Rep:
|
DVD mounted without read permissions. How to add read permission to UDF?
[ Log in to get rid of this advertisement]
How to get read permissions on a DVD-RW with UDF that was recorded from a DVD recorder?
I would like to watch old videos from a DVD-RW written with a DVD recorder, but it can't be accessed from Linux because it has no read permission:
Code:
$ stat StorageLabs\ TinyUDF\ Volume/
File: StorageLabs TinyUDF Volume/
Size: 136 Blocks: 4 IO Block: 2048 directory
Device: 700h/1792d Inode: 1299 Links: 4
Access: (0000/d---------) Uid: (29999/username) Gid: (29999/username)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100
Birth: -
Making an image from the disc doesn't help, since it is always mounted read-only.
Code:
$ sudo mount DVD.iso ../UDF -o rw
mount: /media/username/UDF: WARNING: source write-protected, mounted read-only.
$ sudo chmod a+r /media/username/UDF
chmod: changing permissions of '/media/username/UDF': Read-only file system
Accessing the disc on Windows is trivial (it appears in the file explorer immediately) since it doesn't know Unix permissions.
How do I get read permissions on that UDF disc?
Do I have to resort to using 7z? (It happens to be able to read UDF images. While one could access some files using pipes (stdin / stdout), they are not seekable.)
Last edited by exerceo; 08-23-2024 at 05:48 PM.
Reason: elaborated on 7z
|
|
|
08-23-2024, 06:10 PM
|
#2
|
LQ Guru
Registered: Oct 2004
Distribution: Arch
Posts: 5,379
|
Quote:
sudo mount DVD.iso ../UDF -o rw
mount: /media/username/UDF: WARNING: source write-protected, mounted read-only.
|
Says that it is mounted.
A DVD will be read only. ISO9660 or UDF. You can't write to a finalized DVD.
Code:
sudo mount dvd.iso ~/mount/point
Look in ~/mount/point for the contents.
Edit:
Or, excuse me, you can't write to an .iso either. It is read only.
Last edited by teckk; 08-23-2024 at 06:11 PM.
|
|
|
08-23-2024, 07:29 PM
|
#3
|
Member
Registered: Oct 2022
Posts: 78
Original Poster
Rep:
|
Quote:
Originally Posted by teckk
Says that it is mounted.
A DVD will be read only. ISO9660 or UDF. You can't write to a finalized DVD.
|
I know. The problem is that it is mounted without any read permissions, and the permission can not be changed.
Not even this works:
Code:
$ sudo mount DVD.iso /media/username/UDF -o uid=29999,gid=29999
mount: /media/username/UDF: WARNING: source write-protected, mounted read-only.
$ stat /media/username/UDF
File: UDF
Size: 136 Blocks: 4 IO Block: 2048 directory
Device: 700h/1792d Inode: 1299 Links: 4
Access: (0000/d---------) Uid: (29999/username) Gid: (29999/username)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100
Birth: -
This normally works for exFAT (if not automatically mounted by udisks).
Last edited by exerceo; 08-23-2024 at 07:35 PM.
Reason: exFAT mentioned
|
|
|
12-18-2024, 08:18 PM
|
#4
|
Member
Registered: Oct 2022
Posts: 78
Original Poster
Rep:
|
umask and dmode didn't help
The umask and uid options unfortunately didn't help. I still get 000 permissions.
Code:
$ mkdir UDF
$ sudo mount DVD.iso UDF -o umask=777,uid=29999,dmode=777
[sudo] password for oem:
mount: UDF: WARNING: source write-protected, mounted read-only.
$ stat UDF
File: UDF
Size: 136 Blocks: 4 IO Block: 2048 directory
Device: 703h/1795d Inode: 1299 Links: 4
Access: (0000/d---------) Uid: (29999/ oem) Gid: ( 0/ root)
Access: 1970-01-01 01:00:00.000000000 +0100
Modify: 1970-01-01 01:00:00.000000000 +0100
Change: 1970-01-01 01:00:00.000000000 +0100
Birth: -
$ ls UDF
ls: cannot open directory 'UDF': Permission denied
$ sudo umount UDF
The manual suggests it should work, but it doesn't:
Code:
Mount options for udf
UDF is the "Universal Disk Format" filesystem defined by OSTA, the Optical Storage Technology Association, and is often used for DVD-ROM, frequently in the form of a hybrid UDF/ISO-9660
filesystem. It is, however, perfectly usable by itself on disk drives, flash drives and other block devices. See also iso9660.
uid=
Make all files in the filesystem belong to the given user. uid=forget can be specified independently of (or usually in addition to) uid=<user> and results in UDF not storing uids to
the media. In fact the recorded uid is the 32-bit overflow uid -1 as defined by the UDF standard. The value is given as either <user> which is a valid user name or the corresponding
decimal user id, or the special string "forget".
gid=
Make all files in the filesystem belong to the given group. gid=forget can be specified independently of (or usually in addition to) gid=<group> and results in UDF not storing gids
to the media. In fact the recorded gid is the 32-bit overflow gid -1 as defined by the UDF standard. The value is given as either <group> which is a valid group name or the
corresponding decimal group id, or the special string "forget".
umask=
Mask out the given permissions from all inodes read from the filesystem. The value is given in octal.
mode=
If mode= is set the permissions of all non-directory inodes read from the filesystem will be set to the given mode. The value is given in octal.
dmode=
If dmode= is set the permissions of all directory inodes read from the filesystem will be set to the given dmode. The value is given in octal.
|
|
|
12-18-2024, 09:13 PM
|
#5
|
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,797
|
Did you try explicitly tell to mount udf? Also using loop to mount the image
Code:
mount -t udf -o loop DVD.iso UDF
Maybe see output of dmesg after that
Last edited by keefaz; 12-18-2024 at 09:15 PM.
|
|
|
Yesterday, 08:54 PM
|
#6
|
Member
Registered: Oct 2022
Posts: 78
Original Poster
Rep:
|
This works!
Code:
mount DVD.iso /mnt/DVD -t udf -o ro,mode=555,dmode=555
I confused "mode" with "mask". "mask" subtracts permission bits! "dmode" is an exclusive option for UDF.
Last edited by exerceo; Yesterday at 09:10 PM.
|
|
|
Today, 11:38 AM
|
#7
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,890
|
yes, it was documented: umask= Mask out the given permissions... umask 777 will make it 000
|
|
|
Today, 01:50 PM
|
#8
|
Member
Registered: Oct 2022
Posts: 78
Original Poster
Rep:
|
Quote:
Originally Posted by pan64
yes, it was documented: umask= Mask out the given permissions... umask 777 will make it 000
|
On the DVD image in question, all files and folders had 000 permissions by default (no mounting parameters) because the DVD recorder that created the disc didn't set any Unix permission bits. So umask 777 lead to the same results because there were no bits to mask out.
|
|
|
All times are GMT -5. The time now is 02:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|