Is there a way to setup a directory such that files and directories
- can be read
- written to
- created
but NOT deleted. This is for my photo archive. I want to avoid accidentally deleting photos. Is there a way to do this?
PS/ I have set the archive up using bindfs if that is any help. Two users and one group have 0750 access.
You can set the append-only attribute. From
man chattr
:For directories, this means that new entries can be created, but no entry can be renamed or deleted:
This attribute does not inherit, so you will have to apply this to all subdirectories recursively: