Answer the question
In order to leave comments, you need to log in
How to cheat getpwnam("ftp") in pureftpd? Substitute a different $HOME for a separate Pure-FTPd process?
There was a task to start one more instance of Pure-FTPd within one server. It is necessary to make it so that when entering the different IP servers, different anonymous directories (something like vurtual domains) are given.
After a long ordeal with Ubuntu configs and writing two separate init scripts and config wrappers, we managed to start two daemons for two demen with different IPs.
But here a problem arose: the demon can only take the anonymous directory from the “ftp” user (his home directory). This behavior is hardcoded: after digging through the sources, I found a call to getpwnam("ftp").
Question : how can you fool a daemon in Linux by giving it a different homedir for a getpwnam("ftp") library call?
Or maybe someone managed to get one process to work with VIRTUAL SERVERS as described in the manual?
Thank you all! I will migrate to ProFTPD
Answer the question
In order to leave comments, you need to log in
Well, about modifying /etc/passwd - this is certainly strong, no words.
I would look at other ftp servers that have the right settings and features. I'm not 100% sure, but ProFTPD had a lot of all sorts of settings, including various virtual hosts - maybe this is what you need?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question