Answer the question
In order to leave comments, you need to log in
How to make proftpd + mod_exec work?
Good afternoon.
ProFTPD Version 1.3.4a
mod_exec/0.9.11
Config
<IfModule mod_exec.c>
ExecEngine on
ExecLog /var/log/proftpd/exec.log
ExecOnConnect /var/www/site/data/sh/ftp.sh %u
ExecOnCommand STOR /var/www/site/data/sh/ftp.sh %u
</IfModule>
preparing to execute '/var/www/site/data/sh/ftp.sh' with uid 109 (euid 109), gid 65534 (egid 65534)
+ '/var/www/site/data/sh/ftp.sh': argv[1] =
'/var/www/site/data/sh/ftp.sh' terminated normally, with exit status 0
ExecOnConnect '/var/www/site/data/sh/ftp.sh' succeeded
preparing to execute '/var/www/site/data/sh/ftp.sh' with uid 500 (euid 500), gid 500 (egid 500)
+ '/var/www/site/data/sh/ftp.sh': argv[1] = user
error: unable to open /dev/null for stdin: No such file or directory
'/var/www/site/data/sh/ftp.sh' terminated normally, with exit status 2
STOR ExecOnCommand '/var/www/site/data/sh/ftp.sh' failed: No such file or directory
Answer the question
In order to leave comments, you need to log in
Hello. I ran into exactly the same problem recently. Due to the fact that jail is installed on the home folder for each user (DefaultRoot) - the module cannot access the system environment. And this is freely solved by installing the additional mod_vroot module. Details can be viewed here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question