Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Zip drive device permiossions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Boorish Id
n00b
n00b


Joined: 26 Nov 2004
Posts: 71

PostPosted: Mon Feb 21, 2005 7:16 pm    Post subject: Zip drive device permiossions Reply with quote

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
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Mon Feb 21, 2005 7:30 pm    Post subject: Re: Zip drive device permiossions Reply with quote

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
View user's profile Send private message
Boorish Id
n00b
n00b


Joined: 26 Nov 2004
Posts: 71

PostPosted: Mon Feb 21, 2005 8:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Mon Feb 21, 2005 9:46 pm    Post subject: Reply with quote

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):
Code:
$ man mount
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
View user's profile Send private message
Boorish Id
n00b
n00b


Joined: 26 Nov 2004
Posts: 71

PostPosted: Mon Feb 21, 2005 11:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
g4c9z
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 178

PostPosted: Fri Feb 25, 2005 7:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum