• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Command-line for file manager?

JulianP

Basic Pleskian
What is the Plesk command-line equivalent of setting folder permissions via the file manager in the control panel GUI?
Everything in the control panel has a command-line equivalent, right?

When a lot of intricate file & folder permissions need to be set, this task needs to be scripted using the command-line instead of the control panel.
This isn't the same as setting permissions with a 3rd party command-line utility (e.g. xcacls) because Plesk also updates the .security file (so permissions are correctly backed up & restored, reconfigured etc.)

Alternatively, is there a Plesk command-line utility that updates the .security file to reflect a domain's current file system permissions?

For example, I want set the httpdoscs/log folder to be writeable to the IUSR and sync the file system to the .security file so it reflects the change e.g. by adding
<Entry Tag2="" Tag="" EntryFlags="0x300" AccessMask="Modify" AceFlags="ThisFolderSubfoldersAndFiles" SubPath="domain.com\httpdocs\log" Path="[HTTPD_VHOSTS_D]" SidStr="S-1-5-21-1896785081-9237436453-170731300-8365" Account="IUSR_domain.com" AccounType="1"/>

Thanks,
Julian
 
Found it... This command adds (or removes) one or more permissions to/from a domain folder. It updates .security and applies the change to the file system.

"%plesk_dir%\admin\bin\HostingSecurity.exe" --update-domain-security --vhost-name=<domain> --add-template=path\to\custom-security-template.xml

See HostingSecurity.exe command-line reference:
http://download1.parallels.com/Ples...ne/plesk-win-cli/index.htm?fileName=45525.htm

Hosting Security Metadata Files
http://download1.parallels.com/Ples...nistration-guide/index.htm?fileName=49497.htm
(Where is the Plesk 10.4 version of this documentation?)
 
> Where is the Plesk 10.4 version of this documentation?

General Security Metadata Structure
http://download1.parallels.com/Ples...nistration-guide/index.htm?fileName=49506.htm

Hosted Objects Security: HostingSecurity.exe
http://download1.parallels.com/Ples...ne/plesk-win-cli/index.htm?fileName=45525.htm

The HostingSecurity.exe documentation is useless without the General Security Metadata Structure reference, so it is strange that there's no link or even mention of it, especially as it is in an entirely different document.

The error reporting is lacking and the documentation hasn't been updated to reflect changes in Plesk 11.5, which makes it hard to use without this additional information...
See: http://forum.parallels.com/showthread.php?301177-HostingSecurity-exe-requires-undocumented-parameter
 
Back
Top