I just added a patch for proftpd to extend the functionality of the CreateHome directive. My problem was that the home directory should not be created with the owner being the ftp user, because this can lead to several problems in some deployment scenarios. Basically it boils down to this: Several
users share the same home directory and they shall be able to read each
others files, but a user shall only be able able to delete it's own
files. Currently the owner of the directory can delete all files, even though the sticky bit is set, because the
user who first logs on will own the directory and, therefore, be able to
delete all files, regarding of the files' permissions.
Therefore, I needed a way to automatically create the home directory while being able to specify the owner.
So I added a new option to the CreateHome directive. The option is called homeuid and can be used as follows:
- /ftp/foobar being owned by UID 150 and GID being the new user's group.
- /ftp/foobar/new is owned by UID 10000 and GID of the new user's group.
The patch for mod_auth.c and mkhome.c can be found here. I'll submit this to the official proftpd project during the next couple of days. I'll inform you if the patch is accepted or not.
Posted by: DP
keep up your work.