HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/self/root/usr/local/CyberCP/public/imunifyav/sbin/filemng-execute.sh
#!/bin/bash

# We need to use Plesk's `filemng` command to lower privileges.
# We also need to pass request data via stdin, secure tmp file, or environment variables.
# `pm_ApiCli::callSbin` doesn't expose stdin and has a limit on env var length, so the only option left is
# to use a tmp file.
# However, since on the other side of `filemng` we have less privileges, it is not trivial.
# To resolve this we will simply read the file after `callSbin`, but before `filemng`.
# It's ugly, but it works.
cat "$I360_REQUEST" | plesk sbin filemng "$@"
exit_code=$?
rm -f "$I360_REQUEST"
exit $exit_code