If you're receiving a “Permission Denied” error in FileZilla while trying to edit files with an additional FTP user, this issue is likely due to restrictive FTP settings on your Plesk server. This guide will help you resolve it step-by-step by adjusting ProFTPD settings.
Understanding the Issue
ProFTPD is the FTP server software used by Plesk. When accessing or editing files, restrictions may apply to protect system directories. A directive called RLimitChroot is often set to prevent FTP users from modifying files in directories containing terms like etc or lib, as these are typically sensitive system directories.
Prerequisites
- SSH access to the server with root privileges or a user with sudo permissions.
- Basic familiarity with Linux commands and text editors, such as
nanoorvim.
Symptoms
If the issue occurs, you'll see a "Permission Denied" error in FileZilla, similar to the following:
Response: filename.txt: Permission denied
Additionally, you might find error logs in the /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
Cause
The RLimitChroot directive in ProFTPD is configured to restrict access to files within directories that may contain sensitive data, such as etc or lib. This setting is a security measure but can sometimes block valid file edits.
Resolution Steps
To fix this issue, you need to disable the RLimitChroot directive in the ProFTPD configuration file. Here's how:
- Connect to Your Server via SSH
Use SSH to connect to your server:
Replacessh $username@$server_ip[username]with your SSH username and[server_ip]with the IP address of your server. - Edit the ProFTPD Configuration File
Open the/etc/proftpd.conffile with a text editor, such asnano:sudo nano /etc/proftpd.conf - Disable the RLimitChroot Directive
Locate the<Global>section in/etc/proftpd.confand add the following line within it:
This command disables the restriction, allowing edits in directories with “sensitive” names.RLimitChroot off - Restart the FTP Service
To apply the changes, restart thexinetdservice:systemctl restart xinetd
Additional Tips
- Use a Test Environment: Test these changes in a staging environment to ensure they meet your needs before applying them to production.
- Consult Latest Documentation: Be sure to review the latest
ProFTPDdocumentation for version-specific details.
Disclaimer
Modifying ProFTPD settings can impact server security. Carefully follow the steps and consider testing on a non-production server first.