• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Plesk changing permissions of file when upload with php

Nilton Santos

Basic Pleskian
Hello Everybody,

I have Windows Server with many sites using .asp and .php files, usually I upload file using the php function move_uploaded_file. The upload of file
is done successfully but with wrong permissions(see attached file) and the Backup error below is showed:

[25718726-ef4f-47cc-8e03-d84bb666269a]: Unable to get attributes of the file C:\Inetpub\vhosts\upload.com.br\httpdocs\arquivos\powerGreen.jpg: Access is denied. The file will not be archived. [:105182040]

When I try change the permissions by file manager e get the follow error:

filemng failed: Unable to get the object (C:\Inetpub\vhosts\upload.com.br\httpdocs\arquivos\powerGreen.jpg) security info: (5) Access is denied. at execute "C:\Program Files (x86)\Plesk\admin\bin\filemng.exe" upload --permissions --list-common "--file=C:\Inetpub\vhosts\upload.com.br\httpdocs\arquivos\powerGreen.jpg" "--accounts=tmpE097.tmp"(RunTime::RunAsUser::run line 221) (Error code 1)

Somebody saw this?

Versions:
Plesk Onyx 17.0.17
Windows Server 2012 R2
PHP 5.3.29
 

Attachments

  • right_permissions.png
    right_permissions.png
    10.5 KB · Views: 14
  • wrong_permissions.png
    wrong_permissions.png
    9.9 KB · Views: 12
Hello Everyboby

Follows plesk's support response:


Andrey Ivanov
(Plesk Support)

Jul 25, 11:45 +07

During the investigation I found that it is caused by a product defect with PPPM-4539 ID.

We will do our best to fix the issue in one of the next Plesk updates. Please keep checking the release notes, available here, for announcements:
Change Log for Plesk

Until a fix becomes available, as a workaround, you can fix the file permissions using the command below:
plesk bin repair --repair-webspace-security -webspace-name example.com -all-filesystem-objects
Please check Cannot download files uploaded by PHP scripts: Unable to get the object security info: (5) Access is denied. article for more details. If you have any further questions, please do not hesitate to let me know.
Best regards,

Andrey Ivanov
Technical Support Engineer
Plesk
 
This issue still persists and wordpress uploads aren't backed up successfully in plesk for windows. I found out in the hard way after having to restore from a plesk backup, only to find that all the original images of the websites were missing(but thumbs were fine). Also uploaded pdfs were missing.
I have tried to fix by changing open_basedir, session_savepath etc with no luck.
Whenever I upload an image using wordpress(php) that file is saved properly in the folder, but plesk has no permissions to read it and therefore can't back it up
This is a critical issue.
I mean we can't keep: 'plesk repair permissions' every day in order to have the files readable by plesk
 
This is still an issue. Any bugfix? Changing the hosting is not an option :oops:
In other terms - the hosting has a wrong umask, and I need to know, how to fix this for all hostings .... All but wordpress hosting spaces do not set the permissions right.
Ideas?
Kind regards
Christoph
 
Back
Top