how to change permissions of files and folders in linux

Filed in Linux 0 comments

to change permision there is a command to do so that is chmod
Example:

chmod 644 customfile.html

this will change the permission of the file “customfile.html” to 644
what does 644 mean?

every file and folder in lniux has 2 thre main field for permission
one will provide the user and group and world access
the other will creat the permision of these accesses
the read access of a file or a folder hase a value of 4
the write is 2
and the execute has the value of 1

so to have a better visual understanding I will show you the permission of 644

Mode User Group World
Read 4 4 4
Write 2 2 2
Execute 0 0 0
Permission 6 4 4

hope you had a better understand of the permission now
so lets talk about how to change a permission of a directory(folder)
just like changing the permission of a folder

chmod 755 myfolder

to make it recursive meaning all of the folders and fiels inside this myfolder directory will be change

chmod -R 755 myfolder/*

No related posts.

Posted by voshka   @   23 February 2010 0 comments

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Previous Post
«
Next Post
»
CrossBlock designed by DeltaManual.Com  |  In conjunction with Web Hosting   |   Web Hosting   |   Reverse phone