Subfolders and files do not inherit permissions inside vhosts folder

Created:

2016-11-16 12:45:26 UTC

Modified:

2017-04-24 11:34:20 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Subfolders and files do not inherit permissions inside vhosts folder

Applicable to:

  • Plesk 12.5 for Windows

Symptoms

Even with "Full Control" permissions on a vhosts directory for a specific user/"Everyone" subdirectories are inaccessible.

Cause

Plesk exercises two different security policies towards Windows objects - Disk security and Hosting security. Hosting security is determined by individual set of rules for every webspace which defined by .security file.

Resolution

  1. For existing webspaces:

1.1 Open %plesk_vhosts%\\example.com\\.plesk\\.Security file;

1.2 Add the entry like this:

       <Entry AccounType="1" Account="user_name" SidStr="S-1-5-21-690177332-3602642397-1174271233-1174" Path="[HTTPD_VHOSTS_D]" AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0x0" Tag="" Tag2=""/>

Note: Replace value of SidStr with the correct one for the webspace. It can be found from any other entries in this file.

1.3 Run the following command in privileged command line prompt (launched as Administrator):

    "%plesk_bin%"\\HostingSecurity.exe --repair-webspace-path-security --webspace-name=EXAMPLE.COM --user-name=DOMAIN_USER_NAME --path==%plesk_vhosts%EXAMPLE.COM

Note: DOMAIN_USER_NAME is System user of the subscription. (Account in .security file where Tag="DomainUser")

  1. For new webspaces:

2.1 Open %plesk_dir%\\etc\\hosting_template.xml file;

2.2 Add the following entry:

    <Entry AccounType="1" Account="user_name" Path="[HTTPD_VHOSTS_D]" AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0x0" Tag="" Tag2=""/>
  1. For vhosts folder:

3.1 Create %plesk_dir%\\etc\\DiskSecurity\\1.xml

3.2 Add the following entry:

       <?xml version="1.0" encoding="utf-8" ?> 
<Entries>
<Entry AccounType="1" Account="user_name" Path="%plesk_vhosts%" AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0" />
</Entries>

3.3 Run the following command:

    %plesk_bin%plesk repair --directory-permissions -directory %plesk_vhosts%

More information could be found from our internal documentation here:

Changing Security Settings for File System Objects and Accounts
Customizing Disk Security
Customizing Hosting Security

Note: Please be aware any custom permissions could cause a security issue.

Have more questions? Submit a request
Please sign in to leave a comment.