I have a problem in shared hosting when trying to access a resource within public_html/accounting/tmp
When I try to access a file in that directory, it gives me the error 403 Forbidden Access to this resource on the server is denied!
In the cpanel log I got the following:
2020-11-22 13:09:24.172080 [INFO] [22332]
[190.183.80.134:61644-Q:B996F4677DDA92B2-47#APVH_faeppfss.com.ar:443]
/home/faeppfsscom/public_html/contable/tmp/tmpIZ0mcZ.pdf: access is denied.
I checked in the cpanel the configuration of my .htaccess and it is the following:
RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^faeppfss\.com\.ar$ [OR]
RewriteCond %{HTTP_HOST} ^www\.faeppfss\.com\.ar$
RewriteRule ^/?$ "https\:\/\/faeppfss\.com\.ar\/contable" [R=301,L]
The directory has 755 permissions. However the files are created with 655 permissions
It was resolved by applying the following command every time I generate a new file
This changes the permissions originally assigned to the file. So the 403 error was resolved.