LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-16-2005, 03:55 PM   #1
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
permissions not staying using chmod after reboot


hi im having trouble keeping my cdrom drive to keep the permissions of read and write for world/other. Are changes made with chmod permanent? The permissions change when grip freezes up and i have to reboot by shutting off the power, so i imagine that is why they don't stay but it is frustrating to have to always change the mode everytime so that grip can read and write using the drive.
 
Old 08-16-2005, 04:10 PM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
There are two systems of setting up devices for Linux currently: devfs (which is to be phased out) and udev. I don't know if Fedora Core uses devfs or the replacement udev, but I would wager on the latter if I had to, so read up on how to set up udev properly (man udev should be a good start).


Håkan
 
Old 08-16-2005, 04:18 PM   #3
sinner
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Distribution: Gentoo 2005.1 AMD64
Posts: 5

Rep: Reputation: 0
If I remember correctly changes to permissions on mountpoints needs to be done in your /etc/fstab .

This is my line for the cdrom in /etc/fstab:
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,users 0 0

Its the noauto,users part that is interesting for permissions.

Hope this helps.

/Sinner
 
Old 08-16-2005, 04:31 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by hw-tph
There are two systems of setting up devices for Linux currently: devfs (which is to be phased out) and udev. I don't know if Fedora Core uses devfs or the replacement udev, but I would wager on the latter if I had to, so read up on how to set up udev properly (man udev should be a good start).
Three, actually ... funny you should only mention
the ones that DO forget perms.

There's also the good old static device-nodes a la 2.4
of course ... in which case the perms would be permanent.

Quote:
Originally posted by sinner
If I remember correctly changes to permissions on mountpoints needs to be done in your /etc/fstab .

This is my line for the cdrom in /etc/fstab:
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,users 0 0

Its the noauto,users part that is interesting for permissions.
Nuh, that doesn't change the permissions, only says whether
the user is allowed to run the mount or not. The perms on
mount-points as such are still set using chmod.



Cheers,
Tink
 
Old 08-16-2005, 05:42 PM   #5
sinner
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Distribution: Gentoo 2005.1 AMD64
Posts: 5

Rep: Reputation: 0
I stand corrected Tinkster....
After a bit of research though i found that permissions can be set in fstab using umask, for example:
Code:
/dev/hda2               /mnt/windows    vfat            noauto,umask=022,user   0 0
will set the permissions to on the mountpoint to 755 ,with the user and group being those of the user that mounted the drive.
umask=000 would be 777, so it starts from allowing everything and then deselects permissions.

The modes are as follows (the first column is the mode octal number):

Quote:

M | R W X
--------------------
0 | * * *
1 | * * -
2 | * - *
3 | * - -
4 | - * *
5 | - - *
6 | - * -
7 | - - -

/Sinner

p.s
I know this applies to harddrives and I do not think cdroms are any different

Edit:
info snipped from:

http://forums.gentoo.org/viewtopic-t...untpoints.html
http://forums.gentoo.org/viewtopic.php?t=29285

Last edited by sinner; 08-16-2005 at 05:44 PM.
 
Old 08-16-2005, 05:45 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Let me correct you again:

It *doesn't* modify the permissions of the mount-point.
It changes the perms for the stuff that's being mounted
there. Once you unmount the perms on the mountpoint
will be the same they were before you mounted anything.



Cheers,
Tink
 
Old 08-20-2005, 03:34 AM   #7
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
to change the permissions of my cd rom drive would i change the entry in 50-udev.permissions or would i make a new file starting with a number less then 50 specifically for my cdrom? something like 10-cdrom.permissions? I've changed the permissions in 50-udev.permissions for my cdrom but it results in less permssions then if i hadn't changed it. i changed it from 0660 to 0666. thanks for any replies in advance.
 
  


Reply



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
chmod won't change the file permissions midtown266 Linux - Newbie 12 11-28-2004 07:46 PM
chmod shows change to permissions, but ls-l doesn't vdemuth Slackware 6 07-03-2004 04:29 AM
windows mount not staying after reboot - fstab looks OK ScottUT Linux - Newbie 5 01-21-2004 07:01 PM
Changing permissions (chmod) teyesahr Linux - Newbie 1 07-31-2003 04:52 PM
chmod and file permissions help qages Linux - General 5 01-27-2003 06:08 AM

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

All times are GMT -5. The time now is 10:36 AM.

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