Running scripts

Pupeno pupeno at pupeno.com
Fri Oct 21 15:23:22 UTC 2005


Hello,
I have made some scripts to make backups and it was running ok when I was 
using Gentoo, but now, with (k)ubuntu, they don't work and I don't understand 
why. I get permision denied or similar errors:

pupeno at ulab:/media/usbdisk$ ls -la
total 48
drwxr-xr-x   8 pupeno pupeno  4096 2005-10-21 12:19 .
drwxr-xr-x   5 root   root     168 2005-10-21 11:54 ..
drwxr-xr-x   6 pupeno pupeno  4096 2005-08-14 16:27 andi.pupeno.com
-rwxr-xr-x   1 pupeno pupeno    34 2005-10-21 12:17 backup
-rwxr-xr-x   1 pupeno pupeno   905 2005-10-21 12:11 backup.sh
drwx------   2 pupeno pupeno 16384 2005-08-10 20:42 lost+found
drwxr-xr-x   6 pupeno pupeno  4096 2005-03-16 01:42 master.powerfulnet.net
drwxr-xr-x   6 pupeno pupeno  4096 2005-08-13 23:17 poly.powerfulnet.net
drwx------  33 pupeno pupeno  4096 2005-10-18 23:04 pupeno
drwxr-xr-x   7 pupeno pupeno  4096 2005-08-13 14:29 ulab.pupeno.com
pupeno at ulab:/media/usbdisk$ cat backup
#!/bin/bash
ssh-agent ./backup.sh
pupeno at ulab:/media/usbdisk$ cat backup.sh
#!/bin/bash
ssh-add ~/.ssh/id_dsa

exclude="--exclude=/var/backup/ --exclude=/var/tmp/ --exclude=/var/cache/"
param="--verbose --archive --relative --delete --delete-excluded 
--delete-after --stats --partial --progress --compress --numeric-ids 
--rsh=ssh $exclude"
dir="/var /etc /home /root"

echo "Backing up ulab.pupeno.com"
rsync $param $dir ./ulab.pupeno.com/
echo "Done"
echo "***********************************"

echo "Backing up andi.pupeno.com"
rsync $param root at andi.pupeno.com:"$dir" ./andi.pupeno.com/
echo "Done"
echo "***********************************"

echo "Backing up master.powerfulnet.net"
rsync $param root at master.powerfulnet.net:"$dir" ./master.powerfulnet.net/
echo "Done"
echo "***********************************"

echo "Backing up poly.powerfulnet.net"
rsync $param root at poly.powerfulnet.net:"$dir" ./poly.powerfulnet.net/
echo "Done"
echo "***********************************"
pupeno at ulab:/media/usbdisk$ ./backup
bash: ./backup: /bin/bash: bad interpreter: Permission denied
pupeno at ulab:/media/usbdisk$ ssh-agent ./backup.sh
./backup.sh: Permission denied
pupeno at ulab:/media/usbdisk$ $ sudo ./backup
Password:
sudo: unable to execute ./backup: Permission denied
pupeno at ulab:/media/usbdisk$

I can't even run them as root!!! any ideas ?
Thank you.
-- 
Pupeno <pupeno at pupeno.com> (http://pupeno.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20051021/f2488a61/attachment.pgp>


More information about the ubuntu-users mailing list