• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Apache can't create files under user permissions

F

Flintus

Guest
Plesk 7.5.4, FreeBSD 4.9

Problem description:
When users use php scripts creating/uploading files, the files are owned by apache:psacln while they should be owned by userid:psacln

How can this problem be fixed?
 
Agreed

I hear ya... it's annoying because your clients then cannot delete or edit files that have been uploaded through web based scripts.

You could set up a cron job to chown <usr>:psacln everything in their dir, but this isn't a very good fix, and is specific to each user.

This is what you need to do:

http://forum.swsoft.com/showthread.php?s=&threadid=24767&highlight=ownership+php

I'm on RHEL3, going to try the RPM for suPHP

Apparently this is not compatible with using .htaccess to specify php values, and since many of our clients do this, I cannot use suPHP. :S

Jordan
 
Is this problem particular to FreeBSD 4.9 and Apache 1.3 or it is global Plesk problem with permissions ?
 
Originally posted by Flintus
Is this problem particular to FreeBSD 4.9 and Apache 1.3 or it is global Plesk problem with permissions ?

It's not the Plesk problem, it's the inherent problem of PHP
 
Is it inherent of PHP4 or PHP5 too ?

Is this problem inherent of FreeBSD or Linux too ?

When adding/editing files via admin interface (php5) permissions are set correctly. Does admin interface use chown command?
 
Originally posted by Flintus
Is it inherent of PHP4 or PHP5 too ?

Is this problem inherent of FreeBSD or Linux too ?

When adding/editing files via admin interface (php5) permissions are set correctly. Does admin interface use chown command?

Plesk admin interface? Yes, it uses chown command (through the suid wrapper to gain root privileges).

It is inherent problem of mod_php (both 4 and 5, both Linux and FreeBSD): everything is being executed with apache privileges, and for using chmod (or creating files belonging to other users) you need root privileges.

Only the way to make it work properly is to use suEXEC with PHP-CGI or non-trivial setup of FastCGI PHP (I know the FastCGI solution is theoretically possible, but don't know whether it was implemented in practice).

Sad things are: such setup requires BUNCH of system resources, and Plesk does not support it.
 
Back
Top