- Plesk for Windows
Script which uses the PHP function
move_uploaded_file returns the following error:
Warning: move_uploaded_file(./sent/blank.txt): failed to open stream: Permission denied in C:\inetpub\vhosts\example.com\httpdocs\script.php on line 4 <br\> Warning: move_uploaded_file(): Unable to move 'C:\Windows\Temp\php3F17.tmp' to './sent/blank.txt' in C:\inetpub\vhosts\example.com\httpdocs\script.php on line 4
Insufficient security properties on directories.
Make sure that:
IWPG_user, where user is a system user of the subscription who has rights to "Read", "Write" and "Modify" the
The destination folder from the error message exists in the
%plesk_vhosts%\example.com\httpdocs\directory and the system user from the previous step has similar access rights.
Note: If the destination file is located inside a directory, these permissions must be set to the this directory as well (e.g. ./images/)
safe_mode_exec_dirparameters of the PHP handler are disabled.
It can be checked on the phpinfo() page of the domain: Plesk > Domains > example.com > PHP Settings > View the phpinfo() page.
If one of options is enabled, disable it by adding a corresponding value in the additional directive at Plesk > Domains > example.com > PHP Settings > Additional configuration directives, for example:
safe_mode_exec_dir = Off