[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is this possible with DAC or ACL?



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`?

Yes.  Simply change the owner of /dir to theuser, but make sure the
parent of /dir (which is / or root because of course you did not give
a POOR EXAMPLE which has a different number of slashes than the actual
directory!!) is owned by root, and isn't writable by "group" or "other".

Since / should already be owned by root, there's nothing required
there, but you can verify its ownership and permissions with ls -ld /


Reply to: