SID-02423: BackupRestore: Bad Interpreter error
| Status: |
Answered |
TWiki version: |
6.1.0 |
Perl version: |
v5.26.1 |
| Category: |
BackupRestorePlugin |
Server OS: |
Open SuSE Leap15.1 |
Last update: |
6 years ago |
I installed TWiki 6.1.0 on Open
SuSE Leap15, and trying to Restore from a TWiki 6.0.1 site. ( I appreciate I am trying to restore a backup made on an earlier release ) and it never completes.
Running backuprestore from command line:
# twiki/bin/backuprestore status
produce this error:
backuprestore: /ms/dist/perl5/bin/perl5.26.1: bad interpreter: No such file or directory
Looks like a Windows error to me, no idea why.
In Apache2 ( 2.4 ) I get this:
End of script output before headers: backuprestore...
AH01215: (2)No such file or directory: exec of '/srv/www/twiki/bin/backuprestore' failed
--
Gerrit le Roux - 2019-12-19
Discussion and Answer
This looks like a bad installation of
BackupRestorePlugin. I have a hunch that someone ran a tool over your binaries to rewrite the shebang line (TWiki comes with a script
rewriteshebang.pl). Check the first line of
twiki/bin/backuprestore: It should just read
!perl -w.
To test this assumption, try to run
perl twiki/bin/backuprestore instead: If the error goes away, we have the culprit, if it persists, then somewhere on your system points
perl to
/ms/dist/perl5/bin/perl5.26.1 (try
which perl on the command line).
As for the other error: Did you install the plugin in your TWiki area
/srv/www/twiki/? And if so: is
/srv/www/twiki/bin/backuprestore executable by the web server's user id?
--
Harald Jörg - 2019-12-19
--
Gerrit le Roux - 2019-12-20
Hi
Thank you very much! I never fiddle with twiki source files, so I didn't even think to check the source file - but as you said, the first line on backuprestore was the culprit. It was:
#!/ms/dist/perl5/bin/perl5.26.1 -w
I replaced it with:
#!/usr/bin/perl -w
And now I can make backups again!
To answer your question about permissions, that was already set correctly.
I am not going to restore from the old system ( using backuprestore ), as I copied all my old scripts over manually already, so all is working now, just took ages to figure which was my files and which are system files, and getting permissions right.
Thank you VERY VERY much, a very simple solution, I have no idea why that first line is incorrect, I downloaded 2 or 3 copies and they were all wrong!
--
Gerrit le Roux - 2019-12-20
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.