Results 1 to 5 of 5
hello everyone!!!! im a linux newbie, ive already installed centos 4, centos 5.1 and kubuntu linux..... in all these installation i find it a bit easy and it went well.... ...
- 01-29-2008 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 3
directory/file permissions
hello everyone!!!! im a linux newbie, ive already installed centos 4, centos 5.1 and kubuntu linux..... in all these installation i find it a bit easy and it went well.... my problem as most newbie's are... are the usage/syntax of the commands..... right now im on the chown, chmod, chgrp commands and i cannot seem to get the correct permissions to access the directory.... i created 3 users with each a directory ive also made each a sub-directory with a file.... i change the file permissions within each directory/file but i cannot access a directory using A-user to B-user to C-user and vice versa... kindly help anyone
- 01-29-2008 #2Just Joined!
- Join Date
- Jun 2006
- Posts
- 29
You better read man pages for every commnad you wanna try.
chmod -R 0777 dir it changes access permissions to all users
- 01-29-2008 #3Just Joined!
- Join Date
- Jan 2008
- Posts
- 3
directory/file permissions
thanks for the reply man..... yeah ive been reading man pages and lots of tutorials lately and since im still new to this linux i can't quite get the syntax going
- 01-29-2008 #4
Hi and Welcome !
Check here for detailed tutorial on Permissions in Linux.It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 01-29-2008 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Each file or directory can have permissions for the owner (user), for the group and for the others.
The permissions are stored in three triplets. Each triplet describe the read, write and execution permissions for the user, the group and the others.
So, rwxrwxrwx means read, write and exec permissions for everyone. rwxr-x--- means read, write and exec for user, read and exec for the group and nothing at all for the others.
If you want to change the permissions you use chmod. You can use u for users, g for group, o for others, + or - to add or substract permissions and = to set them on an absolute manner.
You can also set them using numbers. 4 is read, 2 is write, 1 is exec, sum them up and you get the permissions you want for u, g, or o. Then you put them all together and you have the thing.
chmod 777 is rwx for all.
chmod 750 is rwxr-x---
chmod 644 is rw-rw-rw-
You get the idea.
Note that x is needed if you want to access a given directory, so, beware of that when using chmod -R to change permissions recursively.


Reply With Quote
