Why "You don't have permission to access /appdir/_lib/prod/lib/php/nm_ini_manager

Slowly I am going mad. Having managed the deadline, I am ready to deploy. So I get the usual message about needing to create the db connection. (MySQL, Linux. Apache).
Now I get “You don’t have permission to access /appdir/_lib/prod/lib/php/nm_ini_manager2.php on this server.”
I am the owner of the files.

So, how do I create the connection short of making everything 777?

Thanks

[QUOTE=GuiGuy;32795]Slowly I am going mad. Having managed the deadline, I am ready to deploy. So I get the usual message about needing to create the db connection. (MySQL, Linux. Apache).
Now I get “You don’t have permission to access /appdir/_lib/prod/lib/php/nm_ini_manager2.php on this server.”
I am the owner of the files.

So, how do I create the connection short of making everything 777?

Thanks[/QUOTE]

First set all rights of _lib to 777 and setup your connection. Then change it back to 644. Not sure if this is the best way, but this is how I do it.

If www-data is the owner then 644 for files and 755 for folders is ok

chown -R www-data:www-data *
find . -type f -exec chmod 644 {} +
find . -type d -exec chmod 755 {} +

I’m frustrated and disappointed that even when setting EVERYTHING in _lib to a very risky 777, I still get
Forbidden
You don’t have permission to access /appdir/_lib/prod/lib/php/nm_ini_manager2.php on this server.

The installation was planned for a business class virtual host server, but I guess we can forget about that and I better start thinking about excuses I can make to the client.
What a crock.
IIRC deployment has always been hit and miss with Scriptcase. It’s got me beat why they can’t implement an installer for deployment along the lines of most CMS systems, like Joomla, for example.
Of course, if you have any ideas that might help me overcome this, I’d be grateful.

[QUOTE=gbravi;32806]If www-data is the owner then 644 for files and 755 for folders is ok

chown -R www-data:www-data *
find . -type f -exec chmod 644 {} +
find . -type d -exec chmod 755 {} +[/QUOTE]

This definately depends on what linux & apache one is running. On my vanilla CentOS 6.6 with Apache 2.2.15-39 the UID is “apache” not “www-data”.

GuiGuy:
You can check yours by executing “ps - Af | grep httpd” from the shell.
Alternatively, look in your httpd.conf for a line that looks like “User <something>”.

If the owner of the application tree is set properly then there is no need for “777”.

Dave

You are right Dave
My example was for Ubuntu but in Centos/RedHat you must replace “www-data” with the right owner as you suggest.