Wednesday, January 20, 2010

Linux chage folder permision to a group

Hi, In linux root have the full permission over entire os and other users will have some previliages only. So when you loggin to the system and want to have write permission to one folder all you have to do, first see the permission of that folder, it contains three blocks,

OWNER - root

GROUP - root

OTHERS --

Here this means all all writes are permitted to root only. If you want to have write permission to this folder, First change the group permission to your group, then provide the write permission to the group. For this follow the below commands

First login as superuser that i.e root for this run command 'su' in the terminal

sudo su

enter root password:

chgrp -R venkat /var/www

#the above command will change the group

chmod -R g+w /var/www

#the above command will provide the write permission to the group

Now the user who logged in as venkat can have the read write permission to the folder var/www





r = read permission
w = write permission
x = execute permission
- = no permission

Ref: http://www.tuxfiles.org/linuxhelp/filepermissions.html

http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html

0 comments: