It looks like the permissions for the .htaccess file created for example.com/wp-content/uploads/espresso/logs are 0600 or ‘user read/write, everyone else deny’.
While that may work if PHP is running as the webserver’s user, if it’s not, the webserver can’t read the file.
With Apache 2.4 and PHP7-FPM set up to run as the user, you see a
Forbidden
You don't have permission to access /wp-content/uploads/espresso/logs/espresso_log_[long hex string].txt on this server.
Server unable to read htaccess file, denying access to be safe
403 message.
As the contents of the .htaccess file are “deny from all” it’s doing the right thing, but it would be better if the file were created with 0644 permission.
It looks like the permissions for the .htaccess file created for example.com/wp-content/uploads/espresso/logs are 0600 or ‘user read/write, everyone else deny’.
Event Espresso itself doesn’t set the permissions on the file, WP does.
After a little hoop jumping, EE uses $wp_filesystem->put_contents() to create the .htaccess file.
put_contents() calls its own chmod function which sets the permissions based on the FS_CHMOD_FILE and FS_CHMOD_DIR constants.
Are you overriding those constants within your wp-config.php file?
No, I’m not. The log files themselves are created 0644.
I’ll see what the constants are set to later.
Viewing 2 reply threads
The support post ‘.htaccess file for /uploads/espresso/logs/ only readable by user’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.