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.
What filesystem do you have? You can try setting immutable attribute on that file
As stated, a file can be removed if you have write permission on the directory where it resides. However, you cannot remove a directory if it isn't empty, even if you have write permission on the parent directory. Thus, this hack should work:
Now if you try to remove file:
And if you try to remove the directory:
Set the owner and group of the file to root and make it world readable: