Ftp – pure-ftpd: one readonly/non-deletable file in home directory


Is there a way to have a file in the user's FTP home directory without the ability to modify/remove it from that directory over FTP?

So the user has write permissions on his own home folder, thus the ability to remove files. An exception should be made for a single file, which has the same filename and contents for each account.

The solution I'm thinking of right now to run a periodic script to check the presence of that file, and if not, put it back. But I wonder whether there's a better solution than this.

Best Answer

What filesystem do you have? You can try setting immutable attribute on that file

chattr +i filename
Related Topic