Recently, I deleted some files accidentally. Fortunately, I was able to recover them. That is why I would like to prevent deleting files in a particular directory but still allow to create new files and modify them. So, permissions should be rwx, but if I want to delete ANY file (created by ANY user) in this directory, I should be prompted to input a password. Is this possible somehow on Debian Testing?
You can do that with
unionfs. You put the files which are to be protected in the read-only level.
Real file deletion could be realized with password protection by having the read-only directory in
ro belonging to a special user and having 755 permissions. Deletions could be done with
sudo -u rmuser rm /path/to/ro/file