403 Forbidden after restore

sweatbar

Verified User
Joined
Jul 6, 2019
Messages
33
I moved a cPanel Backup to the server and restored it and the restore process was a success.

But the end user complained that he is getting 403 Access Forbidden Message on his subdomains

These are his subdomains

http://abcd.domain.com/ (This should list the directories)

I tried fixing permissions through this command
./set_permissions.sh set_user_home usernameoftheaccount

but it was the same.
Checked less /var/log/httpd/domains/domain.com.error.log and found this
File(/var/cpanel/php/sessions/ea-php56) is not within the allowed path(s): (/home/usernameoftheaccount/:/tmp:/var/tmp:/opt/alt/php73

Checked OpenBase Path from Admin Portal and it was the correct path.
Tried changing PHP version to 5.6 / 7.3 but that didn't fix it either.
Tried deleting .htaccess /.user.ini/php.ini files ended with no luck.

cd /usr/local/directadmin/scripts ./set_permissions.sh domaindir domain.com

Did not fix the issue as well.

Then I went ahead and added a line in Custom HTTPD for that domain
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp/:/usr/local/php56/lib/php/|

That did not work either so I removed it.



How can I fix this?
On the cPanel Server it works.
 
Last edited:
File(/var/cpanel/php/sessions/ea-php56) is not within the allowed path(s): (/home/usernameoftheaccount/:/tmp:/var/tmp:/opt/alt/php73
Looks like the website tries to write session data (?) into /var/cpanel/php/sessions/ea-php56, which wouldn't exist on a DirectAdmin server. I can't think of any reason why this directory would be selected by default by DA, so maybe the directory is specified in the website code itself?
 
Looks like the website tries to write session data (?) into /var/cpanel/php/sessions/ea-php56, which wouldn't exist on a DirectAdmin server. I can't think of any reason why this directory would be selected by default by DA, so maybe the directory is specified in the website code itself?
Hi Thanks for the reply. No it's codeigniter. I have opened a ticket as well and waiting for a reply.
 
Back
Top