Permission issues on server, can't upload/edit files

I am getting a permission denied when I try to edit .htaccess file for example or trying to upload a theme/plugin.

  • Katya Tsihotska
    • Support & QA

    Hi shurup

    Hope you had a great day!

    I wasn’t able to replicate the issue on your server. I’ve tried to upload files to /wp-content/themes folder, upload themes and plugins using WordPress dashboard, edit .htaccess file and didn’t face any errors. Could you please confirm that the issue still persists? If so, could you describe step by step how can I replicate it?

    Kind regards,

    Katya

  • Michael
    • Design Lord, Child of Thor

    Hi,

    Are you getting a user permission (chmod) issue?

    Use an FTP Client (such as FlashFXP or similar) or Putty (if you know command line on your server) to log into your server with root or admin rights.

    As default:

    All files should be CHMOD 644

    All folders should be CHMOD 755

    wp-config.php and .htaccess might be CHMOD 600 or 660

    This is server settings, restricting those file access. The first number is the file owner, the next number is the group, and the third is the public access. 7 would allow all read, write and execute permissions. Where as 6 would only allow read and write. 4 would be read-only. 0 would not be allowed access.

    The command to change these permissions would be, for example:

    sudo chmod 660 .htaccess

    To check the owner and premissions, for example:

    ls -l .htaccess

    Some FTP Clients however allow this easily, just by right-clicking the file or folder, then selecting Attributes (CHMOD). Ensure you are the owner of the file or have a group permission access to it. Avoid allowing full public access (for security reasons).

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.