LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 08-23-2024, 02:11 PM   #1
exerceo
Member
 
Registered: Oct 2022
Posts: 78

Rep: Reputation: 18
Question 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
 
Old 08-23-2024, 06:10 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,379
Blog Entries: 7

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
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.
 
Old 08-23-2024, 07:29 PM   #3
exerceo
Member
 
Registered: Oct 2022
Posts: 78

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by teckk View Post
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
 
Old 12-18-2024, 08:18 PM   #4
exerceo
Member
 
Registered: Oct 2022
Posts: 78

Original Poster
Rep: Reputation: 18
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.
 
Old 12-18-2024, 09:13 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,797

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
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.
 
Old Yesterday, 08:54 PM   #6
exerceo
Member
 
Registered: Oct 2022
Posts: 78

Original Poster
Rep: Reputation: 18
Lightbulb 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.
 
Old Today, 11:38 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,890

Rep: Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871Reputation: 7871
yes, it was documented: umask= Mask out the given permissions... umask 777 will make it 000
 
Old Today, 01:50 PM   #8
exerceo
Member
 
Registered: Oct 2022
Posts: 78

Original Poster
Rep: Reputation: 18
Exclamation

Quote:
Originally Posted by pan64 View Post
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.
 
  


Reply

Tags
dvd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Green Recorder – A Simple Screen Recorder For Linux With Wayland Support LXer Syndicated Linux News 0 09-08-2017 01:37 PM
LXer: Linux Desktop Recorder App Green Recorder 3.0 Released LXer Syndicated Linux News 0 08-08-2017 04:55 PM
Screen recorder with audio recorder JJJCR Linux - Software 1 07-04-2017 02:02 AM
VOX Recorder and Audio Timer Recorder? devmoc Linux - Software 6 10-23-2009 11:55 PM
I can't configure my cd-dvd recorder as a recorder!!! slamd64 Lier Linux - Software 4 10-26-2006 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration