• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Permission denied

Fran1

New Pleskian
I recently restored a plesk backup due to some problems and now I'm getting some permission denied problems that dont allow my app to run properly.

This is how error log looks like

Warning: include_once(/MyAppPath/db/config/configDB.php) [function.include-once]: failed to open stream: Permission denied in /MyAppPath/db/con.php on line 5

Warning: include_once() [function.include]: Failed opening '/MyAppPath/db/config/configDB.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /MyAppPath/db/con.php on line 5

The line 5 of con.php file is a simple include
include_once dirname(__FILE__) . '/config/configDB.php';

I've checked that
echo realpath(dirname(__FILE__) . '/config/configDB.php');
prints /MyAppPath/db/config/configDB.php which is the expected

These are the permissions

/MyAppPath/db/con.php file:
-rw-r--r-- 1 myappuser psacln 4940 Jun 12 12:34 con.php

/MyAppPath/db/config/ directory:
drwxr-xr-x 2 myappuser psaserv 4096 Jun 12 11:05 config

/MyAppPath/db/config/configDB.php file:
-rw-r----- 1 myappuser psacln 336 Oct 15 2014 configDB.php


I don't understand why apache doesn't have permission to read configDB as stated in error log.
If I run 'chmod 644 configDB.php' then it works, however I think that 640 should be enough (and adequate) permissions.

could be this error caused by the plesk backup restore?? Maybe some issue with SeLinux?

please help me.
Thank you!
 
What is output of

# getenforce

command? Make sure that it has Disabled status.
 
@Fran1,

Try to use an absolute path, it seems to be the case that the basedir is not set properly (i.e. it is unknown to the script running).

If the absolute path does work, then you can work around the issue by declaring the basedir explicitly in the running script.

Kind regards.....
 
Back
Top