LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   file & dir permissions (https://www.linuxquestions.org/questions/linux-newbie-8/file-and-dir-permissions-21888/)

lnxDE 05-26-2002 09:44 PM

file & dir permissions
 
Hello, First Post! WOW!

Trying to change persmissions for one user group. Enable permission so they CANNOT access any other file & directories other than their own ones belonging in their group. So they can access all 'accounts'(group) files & dirs but no other groups files & dirs 'sales' or 'IT'.

Working with commands CHGRP & CHOWN, but confused
RH 7

ty, lnxDE

trickykid 05-27-2002 02:25 AM

also you use chmod to change the permissions of dirs/files..

man chmod
for all the details

fatgod 05-27-2002 02:48 AM

Hi lnxDE,

You can 'man' any command that you know (well most anyway) but the man pages ARE confusing when you are fisrt starting out, so with this in mind I'll outline a few things to help you on your way...

first thing is to set the group access to the files... lets work with /usr/local/share as an example. Set the group users as the group for this directory,

chgrp users /usr/local/share

Thats pretty easy. Now you want to allow folks in the group users (and the owner) to have full permissions to access the folder but noone else...

chmod 770 /usr/local/share

you may want users to only read and execute things in this directory (owner has full access...

chmod 750 /usr/local/share

basically the easiest way to set file permissions is using the chmod command with binary input.

so 750 gives the permissions drwxr-x--- to the above dir.

0 gives --- 1 gives --x 2 gives -w- 3 gives -wx 4 gives r--
5 gives r-x 6 gives rw- 7 gives rwx

and the location of the values is also important...

chmod 750 here the 7 is set for the owner of the file or dir. the 5 sets r-x for the group, and 0 is set for the oranisation or anyone who can access the filesystem.

Thats it in a nutshell, there is alot more to chmod but this will get you well under way.


All times are GMT -5. The time now is 09:01 PM.