Hi. On Wed, Jan 06, 2021 at 04:32:02PM +0100, Yvan Masson wrote: > Let's say I have a directory `/dir`. Is it possible to allow a user to > do whatever he wants inside this directory, but not to delete `/dir`?
To delete a directory a user must have an appropriate permissions to a higher-level directory. Taking your example literally: root@x:/# mkdir /dir root@x:/# chown user /dir root@x:/# su - user user@x:~$ rmdir /dir rmdir: failed to remove '/dir': Permission denied Why it behaves so? Because this: # ls -lad / drwxr-xr-x 23 root root 4096 Jan 6 15:33 / Reco