set permissions for files

by Nirmala 2008-04-30 10:22:57

Hi...

To see the permissions for files,use the following command.
ls -l

To set read permission the value is 4.
To set write permission the value is 2.
To set execute permission the value is 1.


Set the permissions use the following command.
chmod 421 sample.php

4 is assigned to user.=>Read permission.
2 is assigned to group.=>Write permission.
1 is assigned to owner.=>Execute permission.

Another way:
chmod u+r sample.php
chmod g+w sample.php
chmod o+x sample.php






Tagged in:

2545
like
1
dislike
0
mail
flag

You must LOGIN to add comments