I am trying to setup a FTP server. I am using VsFTPd on an Ubuntu server that will authenticate against an LDAP server. My users should have access to their personal directory (read/write), to their public directory (read/write), to the public directory of other users (read) and to a general public directory (read). Admin users have read/write access on all directories.
My problem is the following: when a user is created on the LDAP server, he should开发者_高级运维 be able to connect to the FTP server. But his directories will not be created on the FTP server. Another part of the problem is the modification of the status of an user: if an user becomes admin, how do I change his configuration to give him access to all the directories?
One solution would be to execute a script when an user tries to connect to the FTP server. This script would check if the directories are created and if not, create them. But how can I configure VsFTPd to execute a script when an user logs in?
Thank you for your help.
You should use the pam module pam_mkhomedir. Use it globally for all the system or only for VsFTP if your installation was compiled against libpam.so. Check this using ldd in the vsftpd binary.
精彩评论