HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   permission issues with ISPConfig3, nginx and cakephp (http://www.howtoforge.com/forums/showthread.php?t=60024)

ItsDom 21st December 2012 14:31

permission issues with ISPConfig3, nginx and cakephp
 
Hi.

I've installed ISPConfig3 according to the perfect server suse 12.2 nginx (with php-fpm), dovecot, ispconfig3 setup but I'm having some issues. I'm sure they're probably not real problems, just me not quite understanding things:

1) I created a site, and extracted the cakephp files to the web folder for that site. Unless I chown root:root with the cakephp folder, I just get 404's when I try load any of the pages. Yet when it root is the owner, even with 777 permissions, the pages load but report that the tmp directory (cakephp's temp directory, /app/tmp) can't be written to.

This confuses me as according to the site setup in ISPConfig, the user is web2 and group is client0.

2) Also, when I update the nginx directive field in the options through ISPconfig, it wont make any changes until I restart nginx - is this normal behaviour? Is there a shortcut or way to do it through ISPConfig without having to go through the terminal? It seems to undermine the point of ISPConfig allowing a semi-automated multi-user hosting environment if when the user wants to change their settings they have to restart nginx (because if they can restart nginx, they can disrupt other users hosting, so they would have to ask me to do it instead)

3) So I can only get cakephp pages to even be visible (e.g. not 404) if I chown root:root. Yet I'm regularly restarting nginx to apply changes to the directives (once all is up and running, I obviously wont have to do this much) but when I restart nginx, it chowns all the files in /web/ back to web2:client0, breaking the little bit of success I have with cake. Is this meant to happen? I'm guessing solving problem 1) would probably solve this problem also.

I feel I've not quite got something setup right, but I'm not sure what. Any input would be greatly appreciated.

Thanks in advanced,

Dom.

falko 22nd December 2012 15:43

Quote:

Originally Posted by ItsDom (Post 289937)
1) I created a site, and extracted the cakephp files to the web folder for that site. Unless I chown root:root with the cakephp folder, I just get 404's when I try load any of the pages. Yet when it root is the owner, even with 777 permissions, the pages load but report that the tmp directory (cakephp's temp directory, /app/tmp) can't be written to.

This confuses me as according to the site setup in ISPConfig, the user is web2 and group is client0.

The PHP process is running as web2:client0, so the files/directories must be owned by that user/group.

Quote:

Originally Posted by ItsDom (Post 289937)
2) Also, when I update the nginx directive field in the options through ISPconfig, it wont make any changes until I restart nginx - is this normal behaviour?

No, this is not normal. Something seems to be wrong with your setup.

Quote:

Originally Posted by ItsDom (Post 289937)
but when I restart nginx, it chowns all the files in /web/ back to web2:client0, breaking the little bit of success I have with cake. Is this meant to happen? I'm guessing solving problem 1) would probably solve this problem also.

nginx isn't changing any permissions.

Which distribution do you use, and which tutorial (URL) did you use to set up the system? Are there any errors in your logs?

ItsDom 30th December 2012 13:18

Quote:

Originally Posted by falko (Post 289984)

Which distribution do you use, and which tutorial (URL) did you use to set up the system? Are there any errors in your logs?

Hi, thanks for the response. Sorry for the delay (festive season etc - hope you had a nice one)

The tutorial I was using was this one:
http://www.howtoforge.com/perfect-se...ot-ispconfig-3

I'm using a 32bit build of suse 12.2 build on suse studio from JeOS with all the packages added through suse studio. It's a 32 bit build as it's running in ESXi guest on an old Dell PE1850 (doesn't have VT-x so can only do 32 bit guests)

ISPConfig interface works fine.

I think the relevent log in the error file is:

Code:

WARNING: [pool www] child 2267 said into stderr: "ERROR: Unable to open primary script: /usr//html/index.php (No such file or directory)"
However, I can't at all figure out how it's coming up with the path /usr//html/ - in which config file is this defined?

Thanks again for the help.

Dom

EDIT: another strange quirk. If I visit http://sausage.server/ I get 404. Yet if I go to http://sausage.server/login.php (I copied the files from the ISPC remote access examples) the file loads (says logged in etc)

However, if i go to http://sausage.server/index.html I get a 404, despite the default index.html file being in the same directory as the login.php which appears to work fine.

(sausage.server is an internal domain)


All times are GMT +2. The time now is 06:19.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.