• 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

File Permissions Confusion

Sal Quintanilla

New Pleskian
Using Plesk 12.0.18 on Windows Server 2012, we're running php code that has two ways of adding files to the host.

If we create the file using a pdf library on the host and save it in host subdirectory X, it has the same ownership properties as subdirectory X itself.

If we use FileReference.upload to upload the file from a remote location, and then use move_uploaded_file to put in the same directory X, the file is there and complete, but most of the users with access to directory X (and to any pdf files created as described above) are not listed in the uploaded file, and therefore don't have access to it. It doesn't seem to have the same rights as the temporary upload directory either.

We'd like to have the uploaded file have the same security settings / user access as the created file, but I'm not sure how to make that happen within Plesk or anywhere else. Describing this situation on google / bing has been difficult, but I'm hoping this is the right place to ask. If anyone has insights they can share on this, I'd appreciate it.

Thanks.
Sal
 
Last edited:
Figured it out, that was straight-forward as soon as I understood all the players. The fix wasn't to impose security attributes to the file, it's attributes were set once it was created. The appropriate thing was to create a user that belonged to both the general Plesk group and the ftp group. That's the account that now has access to all the files.

All that said, if there's a better way to handle it, I'm here to learn.
 
Back
Top