Restore failed : Failed to open /home/-------/cgi-bin/php5.cgi.webmintmp.13471 : Permission denied

Hi All,

When restoring a virtual server omn another server I get this,

rights are 0644

server is a complete new install on a fresh centos 7 system.

Anyone?

Adjusting permission rights is not working as a part of the restore is setting permission rights to folders

Status: 
Active

Comments

What files exist in that cgi-bin directory?

Ok .. what if you run the lsattr command on that php5.cgi script?

just al lot of --- see attached

Ok, so no additional attributes are set that would prevent modification of that file.

Does the domain being restored have a website?

Yes It has a website ( build with Wordpress) several mysql databases..

If you re-try the restore, does the same thing happen?

Also, if you add the line error_stack=1 to /etc/webmin/config , are any more details shown when the error happens?

Restore failed : Failed to open /home/xxxxxxxx/cgi-bin/php5.cgi.webmintmp.6694 : Permission denied Call Stack Trace File Line Function /usr/libexec/webmin/virtual-server/security-lib.pl 291 WebminCore::error /usr/libexec/webmin/virtual-server/security-lib.pl 453 virtual_server::open_tempfile_as_domain_user /usr/libexec/webmin/virtual-server/php-lib.pl 670 virtual_server::flush_file_lines_as_domain_user /usr/libexec/webmin/virtual-server/php-lib.pl 584 virtual_server::set_php_wrapper_ulimits /usr/libexec/webmin/virtual-server/feature-web.pl 1566 virtual_server::create_php_wrappers /usr/libexec/webmin/virtual-server/backups-lib.pl 2272 virtual_server::restore_web /usr/libexec/webmin/virtual-server/restore.cgi 312 virtual_server::restore_domains (eval 46) 6 (eval) /usr/libexec/webmin/miniserv.pl 2361 (eval) /usr/libexec/webmin/miniserv.pl 909 miniserv::handle_request

What are the permissions and ownership of the /home/xxxxxxxx/cgi-bin directory? It looks like the domain owner doesn't have permissions to write to it..

Hi Jamie, for the permissions see the first topic...

whenever i set them ahead, the restore procedure sets it back to 0644

Those are permissions on the cgi-bin directory right?

And I assume it is also owned by the domain owner Unix user?

it's a completely newly build centos7 server, and I restored from a backup made on Ubuntu. so all permissions on folders are set bij the system, not by hand. and yes it's owned by the domain owner. :-)

Is there any chance I could login to this system myself, try a test restore, and see why it is failing? If so, email me at jcameron@virtualmin.com and we'll work out how I can gain access.

Alternately, if you can supply me with the backup that is triggering this problem, I can attempt to restore it on a test system.

Hi Jamie,

I had sent you an email yesterday...

What email address did you send it from? And do you happen to recall the email's subject? Knowing that will make it easy for him to search for it. Thanks!

Sorry, I didn't see your email - but maybe it got classified as spam :-(

Ok, got it .. I will reply via email.

Ok, I see the issue now - the problem was that the domain's cgi-bin directory did not have execute permissions even for the owner, meaning that its contents couldn't be listed!

I have added code to Virtualmin to fix this case in future, and completed the restore of the problem domain on your system by fixing the permissions on cgi-bin, and then re-running the restore with the flags --all-features --except-feature dir

Automatically closed -- issue fixed for 2 weeks with no activity.

Restore failed of domain while performing domain from current to new server. detail as below :

A) Current server has below configuration :

PHP Version 7.0.33-0ubuntu0.16.04.9 Webmin version - Version - 1.840 Virtualmin version - Version - 5.05 B) New server has below configuration :

PHP Version 7.2.22-1+ubuntu16.04.1+deb.sury.org+1 Webmin version- Version - 1.920 Virtualmin version - Version - 6.06 While restoring backup from current server to new, I am getting error as below :

Restore failed : Failed to open /usr/lib/cgi-bin/php7.0.cgi.webmintmp.11248 : Permission denied

Can someone please bring light on this issue and help to resolve ?

Thank you in advance & Regards

@Ilia : Didn't know this both are the same one. thanks :)