• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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