0

I am trying this Backup Shell Script from the server guide. Granted it's for my desktop running Xubuntu 14.04.

The NFS is mounted and accessible. The script has been created and edited with the correct directories I want to back up, and has the following permissions;

-rwxr-x--- 1 root root 661 May 25 20:51 prod1backup.sh

The error given is; tar (child): /home/servershare/networkbackup/zach-Ubuntu-TT-1-Sunday.tgz: Cannot open: Permission denied tar (child): Error is not recoverable: exiting now

I believe tar does not have permission to create the file, as running a tar by itself outside of the script requires sudo.

Any suggestions? I don't know much about scripting, but am trying to pick up bits and pieces.

1 Answer 1

3

I suggest you following two ways.

First. To modify /home/servershare/networkbackup folder's permission.

$ sudo chown -R servershare:servershare /home/servershare/networkbackup

$ ./prod1backup.sh

Second. To use sudo command directly.

$ sudo ./prod1backup.sh

I think that "Permission denied" is shown, because it folder's owner is not current user.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .