I have a site with news messages.
And in my .htacces
file I have this line of code.
RewriteRule ^event/([0-9]+)/?$ events.php?id=$1
If I go to mysite.com/index/event/1 I get an 500 internal server error
The weird thing is that if I change the .htacces
to
RewriteRule ^event/([0-9]+)/?$ nieuws_read.php?id=$1
I don't get that error and the page works correctly.
How is it possible that it doesn't work with all files.
I got this error
[Tue May 27 17:46:41 2014] [error] [client ipadress] SoftException in Application.cpp:249: File "/../../../../public_html/new/events.php" is writeable by group, referer: http://new.mysite.eu/index/events
[Tue May 27 17:46:41 2014] [error] [client ipadress] Premature end of script headers: events.php, referer: http://new.mysite.eu/index/events
[Tue May 27 17:46:41 2014] [error] [client ipadress] File does not exist: /../../../../public_html/new/500.shtml, referer: http://new.mysite.eu/index/events
I hope I gave you enough info. Thx
It's a permission issue. The one-liner command below should fix it.
You'll need to change the username:apache
part below to the user:group names of your http server. Group on Apache is often apache
, on Nginx it's www-data
.
First cd
into your website public directory.
sudo chmod 2775 . && sudo chown -R username:apache . && sudo find . -type d -exec chmod g=rwxs "{}" \; && sudo find . -type f -exec chmod g=rw "{}" \; && sudo setfacl -d -m g::rwx . && sudo setfacl -d -m o::rx .
This will make those permissions persistent to all new files copied to or created in this folder.
Then you can view your new permissions with:
getfacl .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With