Apache, PHP fpm folder permissions

Hi,

I have problem with folders permissions. Apache cannot write to folders 755 it only works when 775 is set.

Currently running php7.4-fpm. Folders permissions looks correctly: owner:owner

How to fix it? All websites cannot write to cache, tmp directories Please help!

I have uninstalled some php extensions, maybe removed some needed module by mistake?

More info:
     -D SUEXEC_CONFIG_DIR=/etc/apache2/suexec/
     -D AP_GID_MIN=100
     -D AP_LOG_EXEC="/var/log/apache2/suexec.log"
     -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
     -D AP_UID_MIN=100


**Ubuntu 20.04:**

Anyone, please help is urgent.

@miojamo,

What are you actually attempting to accomplish?

When using PHP-FPM or fcgid execution mode, your website reads and writes as the “owner” of the site NOT apache. Therefore you can generally use stricter permissions as the “owner” of the site should own all the pages published.

*** “owner” being the user associated with the website, also the account used to FTP or SFTP to the site ***

Best Regards,
Peter Knowles | TPN Solutions

Professional, Affordable Technical Support – https://tpnassist.com

All my websites are down as they can’t write directories :confused: I have no idea why it happened and what to check. Permissions looks ok

@miojamo,

Have you reviewed the “error_log” file for any or all of the websites?

There’s a symbolic link in each home directory at:

/home/username/logs/error_log

Generally speaking if there’s a problem with a website, that’s the first place to investigate.

Best Regards,
Peter Knowles | TPN Solutions

Of course apart PCRE limits exceeded there are no errors related. Websites like Joomla or WP throws that can’t write directories/files

I’ve restored previous snapshot can’t wait any more. Hope it will all work afterwards.

@miojamo,

If you are in need for more direct support, I can schedule some time to look into what’s going on. However depending on what I find it may come with a cost.

My rates are fair, and the initial consultation is always FREE regardless.

Best Regards,
Peter Knowles | TPN Solutions

Request Professional, Friendly, and Affordable Technical Support at: https://tpnassist.com

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.