View previous topic :: View next topic |
Author |
Message |
Boorish Id n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Nov 2004 Posts: 71
|
Posted: Mon Feb 21, 2005 7:16 pm Post subject: Zip drive device permiossions |
|
|
i just put a zip drive in my box its all working fine when you under root but no one else can access it. So i tried chmod a+rw /dev/hdc and when i ls -l the file permissions never change to reflect the chmod command what gives? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
codergeek42 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Mon Feb 21, 2005 7:30 pm Post subject: Re: Zip drive device permiossions |
|
|
Boorish Id wrote: | i just put a zip drive in my box its all working fine when you under root but no one else can access it. So i tried chmod a+rw /dev/hdc and when i ls -l the file permissions never change to reflect the chmod command what gives? | Try mounting it with "umask=000" as an option. _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Boorish Id n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Nov 2004 Posts: 71
|
Posted: Mon Feb 21, 2005 8:32 pm Post subject: |
|
|
mount /dev/hdc4 /mnt/zip umask=000 produced a syntax error, im just wondering why i cant chmod /dev/hdc as root no matter what values i try chmod will not change /dev/hdc's permissions and its annoying! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
codergeek42 Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Mon Feb 21, 2005 9:46 pm Post subject: |
|
|
Boorish Id wrote: | mount /dev/hdc4 /mnt/zip umask=000 produced a syntax error, im just wondering why i cant chmod /dev/hdc as root no matter what values i try chmod will not change /dev/hdc's permissions and its annoying! | I don't mean to be seem condescending or rude, but perhaps you should read the documentation on how to specify a mount option with the "-o <option-list>" parameter (or the equivalent fourth field in the line for your /etc/fstab file):Also, hdc is the entire disc. Are you sure the disk itself has a filesystem, or is it the first partition (specified by hdc1)? Try mounting /dev/hdc1 and see what happens: Code: | # mount -o umask=000 /dev/hdc1 /mnt/zip | Also, just as a quick reminder: /mnt/zip must exist before you can mount a disk or partition on it: Code: | # mkdir -p /mnt/zip | Hth! _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Boorish Id n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Nov 2004 Posts: 71
|
Posted: Mon Feb 21, 2005 11:05 pm Post subject: |
|
|
YA im sure the disk has a file system i can mount it and use it with no problems, but only root can access it. My question is why the hell wont gentoo let me chmod the device file? i shouldnt have to use mount options, i should be able to just change the devices permissions and for some reason nothing i do changes the permissions on it i keep doing ls -l /dev/hdc right after i do chmod a+rw and it says the permissions are lr-xr-xr-x. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
g4c9z Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 03 Jun 2004 Posts: 178
|
Posted: Fri Feb 25, 2005 7:43 pm Post subject: |
|
|
That's 'cause it's a link. You can't change the permissions of a link. man chmod says:
Quote: | chmod never changes the permissions of symbolic links, since the chmod system call cannot change their
permissions. This is not a problem since the permissions of symbolic links are never used. However, for
each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In
contrast, chmod ignores symbolic links encountered during recursive directory traversals. |
I'm not sure I agree that changing the permissions of the device should change the permissions of the files on the device. The 2 things are separate. Maybe I should be able to send commands to a device (write to it) but not touch its files. E.g. a CD writer has a disk such that the files are read-only but the writer itself can be written to, to burn a CD for example. Likewise maybe only root should be allowed to use the device file in order to mount the device but anyone should be allowed to read or write the files on it.
At any rate this has nothing to do with Gentoo but is the way Linux in general works. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|