Jump to content

Lots of Forbidden - Permission denied messages


FrancisChung
 Share

Recommended Posts

Hi there,

I've recently been getting a lot of the following error messages.

I can't see anything on the error logs that the ProcessLog Module provides.

I thought it could be a problem with the DNS, so i changed it to OpenDNS but to no success.

Is there anything else I should check?

If it's a plug-in, what can I do to find out which plug-in it is, besides turning each one off one by one?

Thanks in advance!

-------------------------------------------

P/S XXXXX below is a placeholder for any directories or pages I've been trying to access.

Forbidden

You don't have permission to access /processwire/XXXXX/ on this server.

Link to comment
Share on other sites

Not sure why my permissions would change all of a sudden? 
I have run the  Processwire Diagnostics before, but I can run them again to check permissions.

Also, the errors are occurring randomly.

If it was a strict permissioning issue, it wouldn't run at all full stop, no?

Link to comment
Share on other sites

This is what the Diagnostics returned.
 

 
ATTRIBUTE
VALUE
STATUS
NOTES / CORRECTIVE ACTIONS
Root directory Exists, is readable, is writable, 0755 Failure Folder should not be writable for webserver user. Installation file Does not exist. OK   Installation directory Does not exist. OK   Site directory Exists, is readable, is writable, 0755 Failure Folder should not be writable for webserver user. Assets directory Exists, is readable, is writable, 0755 OK   Cache directory Exists, is readable, is writable, 0755 OK   Session directory Exists, is readable, is writable, 0755 OK
Link to comment
Share on other sites

Looks like Apache had too many open files (????).

Rebooting Apache seems to have fixed it.

[Thu Oct 01 18:28:34 2015] [crit] [client ::1] (24)Too many open files: /Users/FrancisChung/Sites/SprachSpielSpa\xc3\x9f/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://localhost:8888/processwire/page/edit/?id=1030

I do have a lot of tabs open on Chrome. Guessing that could be a possible candidate for failure. 

Link to comment
Share on other sites

  • 2 weeks later...

I tried this and it seems to have fixed it, but my open file limit only went up to 4,000 from 256.

http://duntuk.com/how-raise-ulimit-open-files-and-mysql-openfileslimit

If you're using MAMP, you need to goto the MAMP directory and look for my.cnf

(I think under tmp)

I also tried this on the operating system level, but didn't work too well. 

I will revist when the first solution stops working.

http://apple.stackexchange.com/questions/168495/why-wont-kern-maxfiles-setting-in-etc-sysctl-conf-stick

Link to comment
Share on other sites

Turns out, the above didn't work too well.

I'm having to manually increase the limits for now using the following command.
 

sudo launchctl limit maxfiles 655356 655356

I'm still getting the odd errors, but the frequency far far less and it's managable.

P/S I also found out this is due to a bug in XDebug where it's not closing all the file handles it is opening. Unfortunately, it still hasn't been fixed yet. The XDebug module I'm using is part of MAMP Pro. I guess the alternative is to setup Zend Debugger, but I didn't managed to get it work the first time I attempted it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...