Permissions error when restoring from backup onto new server

twv

Verified User
Joined
Oct 31, 2003
Messages
217
I am moving users from one server to another by creating an admin backup for the user on the old server and then restoring the user on the new server. I have done this before and it has worked well, and it has worked well today so far. However, I have run into a snag with a certain user. After restoring, when I check the user’s site on the new server, it doesn’t load and I get errors like this in /var/log/httpd/domains/DOMAIN.error.log:

Permission denied: [client IP_ADDRESS:43384] AH00529: /home/USER/domains/DOMAIN/private_html/files/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/USER/domains/DOMAIN/private_html/files/' is executable

I have configured the new server with the same custombuild settings as the old server.

I can’t figure out what the problem is. Any suggestions?
 
Since it's pointing to private_html it might be an SSL issue. Is the SSL certificate correct for the new server for this domain?
Do you really use private_html or a symlink to public_html? Maybe the setting in DA for this user (or for all) is not set to automatically link to public_html if you use that.
 
Thanks for your help. I fixed the problem by chmodding 644 all the files that were giving errors. I went back and looked again at my custombuild options and noticed that mod_ruid2=no on the new server (CentOS 8) and mod_ruid2=yes on the old server (CentOS 7). Many of the user’s files on the old server didn’t have read permissions for others. I’m guessing that caused permission to be denied on the new server with mod_ruid2 setting to no.
 
It depens on what php mod you are using. If you use mod_php then you can use mod_ruid2. I've got my servers working this way.
If you enable it, you have to rebuild php. But that would indeed explain things.

I would fix it by enabling mod_ruid2, rebuild php.
After that you can use this script to fix things:
 
Back
Top