Tuesday, November 24, 2009

File permissions in Linux

Hi,
By using chown command through terminal you can give file permissions to the users in linux operating systems without login as root. By default you are not able to access some folders in the linux os due to the security reasons. But sometimes you need to access some folders. Ex: If you want to run php files you need to place the files in the folder called /var/www/html but other than root account no one have write permission to this folder.

So if you want to enable write permissions to that folder for your account simply
open the terminal as
# applications > system tools > Terminal
enter su in the terminal to login as root
#su
it will ask you the root password, give the root password
then run the below command
#chown username /var/www/html/

Now you have the write permissions to that folder.

No comments: