Symptoms
- It is not possible to edit files using Filezilla with an additional FTP user, the following error is shown:
Response: filename.txt: Permission denied
- The following Error message can be seen on
/var/log/secure
logfile:
proftpd: pam_systemd(proftpd:session): Failed to connect to system bus: No such file or directory
proftpd: pam_unix(proftpd:session): session closed for user username
proftpd: pam_unix(proftpd:session): session opened for user ordini by (uid=0)
proftpd: pam_env(proftpd:setcred): Unable to open config file: /etc/security/pam_env.conf: No such file or directory
- The path of the file that user tries to edit contains the "sensitive" directories (etc, lib), for example:
/var/www/vhosts/example.com/httpdocs/modules/lib/
Cause
The ProFTPD directive RLimitChroot
prevents user from editing files containing "sensitive" directories names
Resolution
Disable this directive following the official proftpd documentation:
1. Connect to the server via SSH
2. Open the /etc/proftpd.conf
file with a text editor.
3. Paste the following line between the tags <Global> ... </Global>
of the /etc/proftpd.conf
file:
RLimitChroot off
4. Restart the service:
# systemctl restart xinetd