Articles in this section

File can not be uploaded to the Files menu in Plesk: Unable to copy file or directory: Access is denied. (Error code 5)

Plesk for Windows kb: technical

Applicable to:

  • Plesk for Windows

Symptoms

An existing file somefile.txt can not be overwritten in Plesk > Domains > example.com > Files. When trying to replace the original file with the same somefile.txt, the error below appears:

PLESK_ERROR: ERR [panel] Exception: Unable to copy file or directory: Access is denied. (Error code 5) at Unable to copy (C:\Program Files (x86)\Plesk\tmp{4e7fc727-042a-11ee-913d-00155d006222}) to (C:\Inetpub\vhosts\example.com\httpdocs\somefile.txt)<br> at (RunTime::File::copy line 1591)<br> at (zif_plesk_ex_copy line 1767)
file: C:\Program Files (x86)\Plesk\admin\plib\Service\Driver\Filesystem\Plesk\Windows.php

Cause

Read-Only attribute is set for the somefile.txt on the OS level.

Resolution

  1. Connect to the server via RDP.
  2. Open the C:\Inetpub\vhosts\example.com\httpdocs\ folder's Properties.
  3. Uncheck the Read-Only attribute and apply changes for all the inheritance files and folders. The directory itself will gain the Read-Only attribute after that automatically, however, files and folders inside Document Root will be without it as expected.
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.