LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 09-05-2005, 07:47 PM   #1
Telman
LQ Newbie
 
Registered: Aug 2005
Posts: 19

Rep: Reputation: 0
Changing permissions on cdrom and dvd drives


Hi,

I'm stuck with a problem accessing a DVD-RW media, with my Pionner DVR-107D writer, on Mandriva LE2005 system. The media was written by my new movie DVD recorder, a Samsung DVD-R120.

The problem was already explain in another thread, reference below, but the number of posts & the new direction i get to solve this problem deserve a new thread.

http://www.linuxquestions.org/questi...hreadid=356707

It appears that when i insert a DVD-RW media, from the SAMSUNG's DVD-R120, the Mandriva LE2005 indicate that the directory isn't accessible (not executable, at the directory level), of course this make the media not accessible. Important thing, the root user CAN access it, not regular user.

How can I change this behavior, perhaps within FSTAB, can we force him to make the media accessible? Of course, i already tried the option "exec" before and after the option "user" and "users" since those one seems to make it not executable. But i'm not sure if the term "executable" in mount space means only binaries execution or if include directory execution as in linux securoty space. Anyway, all tries with "exec" always failed.

Note: LE 2005, seems to use gnome volume manager to mount those drives-media.

Is there a knowledgeable person who can help me dig, probably in depth, this problem?

Regards.

Ben
 
Old 09-06-2005, 12:57 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
Have you tried setting umask=000 in fstab?
 
Old 09-06-2005, 01:49 PM   #3
Telman
LQ Newbie
 
Registered: Aug 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Do you propose to remove all permissions, with umask=000.

Can you explain why umask=000 should help?

Ben
 
Old 09-06-2005, 01:59 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
umask=000 modifies the 'permissions' on non-linux filesystems (iso9660,vfat,etc.). It makes the permissions 777 & ~umask (aka, 777 in this case). It should give full permissions.
 
Old 09-06-2005, 02:11 PM   #5
Telman
LQ Newbie
 
Registered: Aug 2005
Posts: 19

Original Poster
Rep: Reputation: 0
About umask

I found myself a part of my previous question.

Ref: http://www.linuxsecurity.com/content/view/117255/141/
------------------------------------------------------------
The umask can be used to control the default file permission on newly-created files. The umask command controls the default file and directory creation mode for newly-created files and directories. It is recommended that you make root's umask 077, which will disable read, write, and execute permission for other users, unless explictly changed using chmod.
The umask command can be used to determine the default file creation mode on your system. It is the octal complement of the desired file mode. If files are created without any regard to their permissions settings, a user could inadvertently give read or write permission to someone that should not have this permission.

The umask for the creation of new executable files is calculated as follows:

777 Default Permissions
-022 Subtract umask value, for example
-----
755 Allowed Permissions

So in this example we chose 022 as our umask. This shows us that new executables that are created are given mode 755, which means that the owner can read, write, and execute the binary, while members of the group to which the binary belongs, and all others, can only read and execute it.

The umask for the creation of new text files is calculated as follows:

666 Default Permissions
-022 Subtract umask mask, for example
-----
644 Allowed Permissions

This example shows us that given the default umask of 666, and subtracting our sample umask value of 022, new text files are created with mode 644, which states that the owner can read and write the file, while members of the group to which the file belongs, and everyone else can only read the new file. Typically umask settings include 022, 027, and 077, which is the most restrictive. Normally the umask is set in /etc/profile, so it applies to all users on the system. The file creation mask must be set while keeping in mind the purpose of the account. Permissions that are too restrictive may cause users to start sharing accounts or passwords, or otherwise compromise security. For example, you may have a line that looks like this:

# Set the user's default umask
umask 033
----------------------------------------------------------------

But, this explanantion works for executable & text files, but i'm not sure about mounted directory. Is umask applied the same way to directory as files?

Thanks to guide me to this way

Ben
 
Old 09-06-2005, 02:20 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
umask is applied in the same way. Note that a users umask and a umask specified in fstab are different things. See the fstab man page for details on its umask.
 
Old 09-07-2005, 09:35 PM   #7
Telman
LQ Newbie
 
Registered: Aug 2005
Posts: 19

Original Poster
Rep: Reputation: 0
With the following line in fstab:
/dev/hda /mnt/DVD_Writer udf,iso9660 umask=0000,iocharset=utf8,ro,exec 0

I got this result:
drwxr-xr-x 2 root root 4096 fév 27 2005 cdrom/
drw-rw-rw- 3 4294967295 4294967295 252 jui 28 04:19 DVD_Writer/

Even if I set umask to 0000 i have the permission 666 which looks like the default permission for new directory, I read this somewhere.

Now, is it possible to change directory default permission from 666 to 777 ? We should not forget that this directory represents the DVD media, in my specific case, it's a DVD-RW. And as a removable media, it's mounted automatically.

For info, when i put a standard DVD Movie in this drive, i got the following permission:
dr-xr-xr-x 8 4294967295 4294967295 716 avr 12 2001 DVD_Writer/

Is it because the hypothesis of default directory permission as 666 don't keep the road? I looked in /etc/profile and found a umask of 022 which doesn't explain why i loose the enter/execute privilege.

Some suggestions?

Ben
 
Old 09-07-2005, 09:45 PM   #8
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
Were those permissions given with the dvd writer mounted?
 
Old 09-07-2005, 10:28 PM   #9
Telman
LQ Newbie
 
Registered: Aug 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Yes, i both cases, the DVD-Writer was mounted.

With the DVD-ROM, Kaffeine started automatically playing... 102 Dalmatians (my daughter movie)

With the DVD-RW, only root user can access the media.

I lookeg on the side of gnome-volume-manager to search if there is some options to configure somewhere related with privileges of mounted media. I found nothing.

Thanks for your help.

Ben
 
Old 09-07-2005, 10:34 PM   #10
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
You know, I've never seen that udf,iso9660 filesystem syntax before. I'm not saying it's wrong, but I am wondering if it is right. Perhaps it's just my turn to learn.
 
Old 09-08-2005, 06:51 AM   #11
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
I believe that it should be fs=udf:iso9960

This however would preclude write to the drive in anything other than udf (for data CDs and data DVDs) and iso9960 (which is used for creating CDs and possibly DVDs from downloaded .iso files).

Perhaps if you don't mind auto-mounting with the equivalent of auto-play you should use 'auto' rather than 'fs=udf,iso9960' and again perhaps this will avoid the root only blockage that you, Ben, are encountering.

HTH

Richard
 
Old 09-08-2005, 08:48 PM   #12
Telman
LQ Newbie
 
Registered: Aug 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I change the fstab line into:
/dev/hda /mnt/DVD_Writer auto umask=0000,iocharset=utf8,users,ro,exec 0 0

And I got this in mtab:
/dev/hda /mnt/DVD_Writer udf ro,nosuid,nodev,users,umask=0000,iocharset=utf8 0 0

And this permission at /mnt level
drw-rw-rw- 3 4294967295 4294967295 252 jui 28 04:19 DVD_Writer/

It's exactly the same result. Only Root user can access the DVD-RW.

I'll search in side of "default directory permissions".

Ben
 
Old 09-08-2005, 09:01 PM   #13
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
Does this occur with all disks, or just some?
 
Old 09-08-2005, 09:19 PM   #14
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Hey - try changing the 'ro' to 'rw' (since 'ro' means 'read only' rather than 'read write'.

Obviously [to me at least] only root can override the 'ro' designation that you have set in /etc/fstab.

Hope This Helps ("HTH")
 
Old 09-08-2005, 09:23 PM   #15
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
And one would set rw on an optical drive... why? Yes, there are a few where you could use dvd+rw for arbitrary filesystems, but that doesn't seem to be the case here. Trying rw with other media is just asking for issues.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Changing permissions on USB external drives theufman Linux - Hardware 9 11-29-2005 09:08 PM
Changing DVD-ROM/CD-RW permissions tdking19 Slackware 1 02-12-2005 01:38 PM
Give user permission to mount/use cdrom drives or usb drives zwyrbla Linux - Newbie 2 08-23-2004 04:30 PM
mounting cdrom drives???? Scarface Slackware 9 11-15-2003 01:36 AM
changing permissions on mounted drives. Moses420ca Linux - Newbie 2 07-04-2003 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 06:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration