• 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.

apache cannot write necessary files/directories

Z

zardozrocks

Guest
I'm currently migrating a site from an old server running WHM to one using Plesk:

Plesk Panel 9.5.4
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Dual core Intel(R) Xeon(R) CPU

The site is a modified version of Joomla and therefore apache needs permission to write certain files and folders. However, on this plesk system, I see that the public_html directory for newuser is owned by newuser:psaserv with permissions rwxr-x--- which is not writeable by apache. If I change the permission on files that must be written by apache to newuser:apache with permissions rw-rw---- will this break anything? I worry that changing the group to anything other than psaserv might break some kind of plesk functionality.

Any help would be much appreciated. On the older server, Apache was configured to chroot/su as the user who owns a particular site so writing the files just worked. On other servers I've deal with, I usually just assign the group of certain files to apache/nobody/www-data depending on the distro and this allows apache to write them.
 
Break something? Probably not. What you would do is make your application less secure by allowing certain directories to be world writable. What you can do is use somethign like suphp or run the php in Plesk as CGI/FCGI instead which then makes apache run the site as the FTP user account instead of the apache user.

The only down side to that is htaccess files dont seem to pick up php settings that way, so if you rely on that to set php values, you may have to just use the permission fix.
 
You can use suphp check my signature link HOW TO and there it is explained. Hope this help. On 9.5 FastCGI is not stable, so I suggest mod_suphp.
 
9.5 FastCGI is fine. We have dozens of servers using it and hundreds of clients using it with out problems. SuPHP on the otherhand is something I personally wouldnt recomend as it takes manual configuration to get it to work on individual domains, otherwise you either have to buy something or manually code some event handlers.
 
Back
Top