Hello,
I'm trying to use the info-script option when creating a multiple-volume archive using GNU tar.
In particular, I was trying the same example provided in the GNU tar manual (
http://www.gnu.org/software/tar/manu...ple-Tapes.html).
Code:
tar -cvf archive.tar --tape-length=10240 /path/to/dir -F./myscript
using the provided script file:
Code:
#! /bin/sh
echo Preparing volume $TAR_VOLUME of $TAR_ARCHIVE.
name=`expr $TAR_ARCHIVE : '\(.*\)-.*'`
case $TAR_SUBCOMMAND in
-c) ;;
-d|-x|-t) test -r ${name:-$TAR_ARCHIVE}-$TAR_VOLUME || exit 1
;;
*) exit 1
esac
echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FD
Archive is created correctly, but when calling the script, tar quits with this:
Quote:
/bin/sh: ./myscript: Permission denied
tar: `./myscript' command failed
tar: Error is not recoverable: exiting now
|
I can't understand why that permission denied. Script is executable (also tried using 777).
Can someone help me, please?
TIA
~Aki