linux command - block rename / rename folder

4

I need to give an ftp user access to the / var / www folder but there are folders that it can not access / edit / delete

I tried a command:

#chmod 000 <pasta>

    

asked by anonymous 10.04.2015 / 15:02

2 answers

6

You have a procedure that can solve your problem

chmod 000 chattr +i -R

With chattr + i neither this code nor root can make changes to the folder and its attributes. The -R is for rendering recursive.

To undo is the following code

chattr -i -R

Some legal links:

5 chattr

Further explanations

    
10.04.2015 / 15:42
0

If he is the owner of the folder he will always be able to rename it, because he will always be able to change the permissions of the folder. I suggest you change the owner of the folder to another user and put the permissions that you want in a group. Make sure the user you want to give the permissions belongs to this same group.

    
10.04.2015 / 15:23