How To Fix “Permission Denied” Error When Editing Files in FileZilla Make it Rain Paper

  • File Management, FTP Accounts, FTP/SFTP
  • 0

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 nano or vim.

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:

  1. Connect to Your Server via SSH
    Use SSH to connect to your server:
    ssh $username@$server_ip
    Replace [username] with your SSH username and [server_ip] with the IP address of your server.
  2. Edit the ProFTPD Configuration File
    Open the /etc/proftpd.conf file with a text editor, such as nano:
    sudo nano /etc/proftpd.conf
  3. Disable the RLimitChroot Directive
    Locate the <Global> section in /etc/proftpd.conf and add the following line within it:
    RLimitChroot off
    This command disables the restriction, allowing edits in directories with “sensitive” names.
  4. Restart the FTP Service
    To apply the changes, restart the xinetd service:
    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 ProFTPD documentation 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.


Did this answer help?

« Back