Click to See Complete Forum and Search --> : dir permissions ...
anton
08-14-2001, 02:01 PM
Hello ,
I want to make my /mnt directory and all sub-directories under eat to be readable-writable-executable for me (not root) :) ... I tried chmod 0777 mnt and of course it did nothing .. so , how would I do this ?
thanks :)
Necro Lin
08-14-2001, 02:37 PM
chmod 777 gives everyone permission into your directory.
add 4 for read, 2 for write, 1 for execute, and 0 for no permision. Hence, the number 6 would give you permission to read & write, but not execute etc.
First number is you, next is your group, and the last one is everybody else.
Therefore, chmod 700 would give you permission to read, write and execute and would take away permissions for everybody else.
Note: the root user is a special user that can get in anywhere. I don't think that you can keep the root out of a directory no matter what you set the permissions to. I may be wrong, but that's the way I think that it works.
Anyone have anything to add?
MrMoray
08-14-2001, 02:55 PM
The first number in the sequence (eg. 777) is for the Owner I believe. So, assuming that to be true, you want a 7 in there to give the owner full rights, but you also need to make sure that <b>you</b> are the owner....i.e. if Root is the owner, then you are giving full rights to Root, not yourself.
I believe this is accurate, but I'm a newbie...can someone verify?
anton
08-14-2001, 06:28 PM
understood ... thx .. well , kind of new it , read chmod manual ;)
but now how would I make myself an owner of that folder ?
thanks again
demetrius
08-14-2001, 06:33 PM
To change ownership you want chown newowner filename. For a folder you may want to use the -r tag as well to make it recursive so you change all files inside the folder to that ownership as well. So you'd use chown -r newowner foldername. You also may want to change the group in the same way with the chgrp command.
demetrius
08-14-2001, 06:35 PM
By the way, root will still be able to read, write and execute no matter what you change the owner/group ownership to. It is the nature of the root account.
anton
08-14-2001, 06:47 PM
thanks :)
by the way , it's a big '-R' :)
demetrius
08-14-2001, 06:48 PM
Oops ... if i was actually in Linux at the moment I'd have caught that ... but I'm playing with WinXP RC1 right now.
stiles
08-14-2001, 07:43 PM
normally users are not alowed to mount filesystems but if the option 'user' is in your /etc/fstab you can do that, problem with that is /mnt is a universal mountpoint used for different devices (in debian and solaris it is, redhat does something funky by making cdrom a subdirectory of /mnt which is dumb, but ohhh well). If your trying to get your cd to be mountable by a user other than other edit your /etc/fstab and add the option 'user' to the line for your CD.