У меня есть некоторые каталоги и файлы, похожие на этот
drwxr-xr-x. 2 ss ss 4096 Oct 3 2004 backup
Обратите внимание на .
в разрешениях.
Пользователь ss
не может удалить этот каталог.
Вопрос
Как установить такую защиту от записи и как отменить ее?
The .
at the end of the permissions is probably not relevant here. It indicates ACLs and/or SElinux attributes apply. See this question for more details.
If the user ss
cannot delete this directory it is probably because he does not have write permission on the parent dir of this backup dir.
Add write permission for user ss
to the parent directory of the directory backup to allow removal.
Deleting a file or directory requires write directory to the parent directory because that is the file you are editing.
If user ss has write permissions on the parent directory and you are still unable to remove the directory check acls (using getfacl
) and SELinux context (using ls -ldZ
).