SID-02486: backuprestore [cgid:error] error spawning CGI child
| Status: |
Answered |
TWiki version: |
6.1.0 |
Perl version: |
5.26.3 |
| Category: |
BackupRestorePlugin |
Server OS: |
Rocky Linux 8.5 |
Last update: |
4 years ago |
Environment Rocky Linux 8.5 (
RedHat); TWiki 6.1.0; selinux disabled;
[cgid:error] [pid 5166:tid 140621859780352] [client x.x.x.x:6006] AH01241: error spawning CGI child:exec of '/var/www/html/twiki/bin/backuprestore' failed (No such file or directory): /var/www/html/twiki/bin/backuprestore, referer: http://x.x.x.x/twiki/bin/view/TWiki/BackupRestoreConsole?action=create_backup
[Mon Dec 27 23:35:18.351696 2021] [cgid:error] [pid 2029:tid 140622102972160] [client x.x.x.x:6002] End of script output before headers: backuprestore, referer: http://x.x.x.x/twiki/bin/view/TWiki/BackupRestoreConsole?action=create_backup
Script/Plugin does exist and owned by apache
-rwxr-xr-x. 1 apache apache 2066 Jul 15 2018 backuprestore
Changed the backup destination of /tmp to another directory owned by apache
[root@OS1 bin]# perl backuprestore create_backup
works.
Note: I need to restore a backup created on TWiki-5.1 to TWiki-6.0 new install using the
BackupRestore plugin
--
Liviu Voina - 2021-12-28
Discussion and Answer
Not sure.Check if the shibang line in your backuprestore script points to a proper perl executable, default:
#!/usr/bin/perl -w
Check also that the script does not have Windows line endings, wch can happen if you use FTP to copy the files. If needed run it through
dos2unix.
--
Peter Thoeny - 2021-12-29
Thank you Peter. The backuprestore script on TWiki-6.1.0 has the following shebang line
#!/ms/dist/perl5/bin/perl5.26.1 -w
Adding
#!/usr/bin/perl -w on top of the above line will make the script run but I get these:
[Fri Dec 31 03:04:09 2021] backuprestore: cannot unlink file for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki-version.txt: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot restore permissions to 0100644 for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki-version.txt: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot unlink file for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki.conf: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot restore permissions to 0100644 for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki.conf: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot unlink file for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki-version-short-6.1.txt: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot restore permissions to 0100644 for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki-version-short-6.1.txt: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot unlink file for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/LocalSite.cfg: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot restore permissions to 0100644 for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/LocalSite.cfg: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot unlink file for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/LocalLib.cfg: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot restore permissions to 0100644 for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/LocalLib.cfg: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot unlink file for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki-version-long-TWiki-6.1.0.txt: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot restore permissions to 0100644 for /var/www/html/twiki/working/work_areas/BackupRestorePlugin/twiki-version-long-TWiki-6.1.0.txt: Permission denied at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
[Fri Dec 31 03:04:09 2021] backuprestore: cannot remove directory for /var/www/html/twiki/working/work_areas/BackupRestorePlugin: Directory not empty at /var/www/html/twiki/lib/TWiki/Plugins/BackupRestorePlugin/Core.pm line 655.
ERROR: Can't copy /var/www/html/twiki/bin/LocalLib.cfg to /var/www/html/twiki/working/work_areas/BackupRestorePlugin
ERROR: Can't copy /var/www/html/twiki/lib/LocalSite.cfg to /var/www/html/twiki/working/work_areas/BackupRestorePlugin
ERROR: Can't copy /etc/httpd/conf.d/twiki.conf to /var/www/html/twiki/working/work_areas/BackupRestorePlugin
--
Liviu Voina - 2021-12-31
The folder
BackupRestorePlugin is owned by
root:root and changed to
apache:apache and it works now
[X work_areas]# chmod -R apache:apache BackupRestorePlugin
/var/www/html/twiki/working/work_areas
[X work_areas]# ls -al
total 36
drwxr-xr-x. 8 apache apache 4096 Dec 31 03:21 .
drwxr-xr-x. 5 apache apache 4096 Jul 15 2018 ..
drwxr-xr-x 2 apache apache 4096 Dec 31 03:21 BackupRestorePlugin
drwxr-xr-x 2 apache apache 4096 Dec 30 05:44 CoreStatistics
drwxr-xr-x 2 root root 4096 Dec 29 02:46 MailerContrib
-r--r--r--. 1 apache apache 192 Jul 15 2018 README
drwxr-xr-x. 2 apache apache 4096 Dec 27 20:39 SetGetPlugin
drwxr-xr-x. 2 apache apache 4096 Dec 27 20:39 TagMePlugin
drwxr-xr-x. 2 apache apache 4096 Dec 31 02:29 VarICON
--
Liviu Voina - 2021-12-31
Yes, all files and directories below
/var/www/html/twiki should be owned by
apache:apache.
--
Peter Thoeny - 2022-01-10
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.