# pure-ftpd - deny users to delete their files



## dfed (Apr 7, 2009)

Hello,

If someone uploads files on pure-ftpd, is it possible that the files cannot be deleted from the ftp server by the user.


----------



## SirDice (Apr 7, 2009)

Add *KeepAllFiles yes* to pure-ftp.conf or add the -K switch.


----------



## dfed (Apr 7, 2009)

I would like to have only one user that can upload files without being able to delete them and all other users to be able to delete files they have uploaded already.


----------



## SirDice (Apr 7, 2009)

That's going to be tricky, not sure it's even possible. The KeepAllFiles option is for _all_ users.


----------



## gelraen (Apr 13, 2009)

> STICKY DIRECTORIES
> A directory whose â€˜sticky bitâ€™ is set becomes an appendâ€only directory,
> or, more accurately, a directory in which the deletion of files is
> restricted.  A file in a sticky directory may only be removed or renamed
> ...


(c) sticky(8)

Maybe needed effect can be achieved in combination with setuid mode on directory?
I had such configuration for some time, but only on anonymous ftp.


----------

