Articles in this section

How to restore default permissions in virtual host directory on Plesk for Linux?

kb: how-to Plesk for Linux FR:PPM-2855

Applicable to:

  • Plesk for Linux

Question

How to restore default permissions in virtual host directory on Plesk for Linux?

Answer

Note: solution for Plesk for Windows is available in the article How to restore default permissions on a domain in Plesk for Windows?

  1. Log into Plesk.
  2. Go to Domains > example.com > File Manager.
  3. ClickScreenshot-2017-12-30_File_Manager_for_example_com_-_Plesk_Onyx_17_5_3_1_.pngnext to a directory or a file and click Change Permissions.
  4. Set the permissions, enable the option Change permissions recursively if necessary, and click Save or Save and resume to apply the changes:
    screenshot.1.png

Note: The recommended permissions are 755 for directories (Read, Write, and Execute for owner, Read and Execute for group and others) and 644 for files (Read and Write for owner, Read for group and others).

In the command-line interface
  1. Connect to the server using SSH.

  2. Obtain list of subscriptions along with their system user names:

    # plesk db "select name, login from domains join hosting on domains.id=hosting.dom_id join sys_users on hosting.sys_user_id=sys_users.id"

  3. Run the following commands while using the information found in step 2:

    Note: Substitute example.com with the real subscription domain name and user_example with the system user of the subscription.

    # find /var/www/vhosts/example.com/httpdocs/ -type f -exec chmod 644 {} \;
    # find /var/www/vhosts/example.com/httpdocs/ -type d -exec chmod 755 {} \;
    # find /var/www/vhosts/example.com/httpdocs/ -type f -exec chown user_example:psacln {} \;
    # find /var/www/vhosts/example.com/httpdocs/ -type d -exec chown user_example:psacln {} \;

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.