I have a problem with a script that I am trying to write.
Ideally, the script should compress the folders and then send the zipped files to the ftp server creating the folder as the name of the zipped file (without extension) but it's not working correctly quite yet, what am I doing wrong ?
Hi, the manually executed script returns this error
mirror: Access failed: 530 Access denied (.zip)
I would like to send the files that zipped to the ftp server, what should I change? Thank you
#!/bin/sh HOST="" USER="" PWD="" FILESIZE="$(du -sm $1 | cut -f1)" ZIPNAME="$(basename $1)" REMOTEFOLDER="$(dirname $1)" if [ $FILESIZE -ge 1500 ] then 7z a -v1400m $REMOTEFOLDER/$ZIPNAME.zip $1 else 7z a $REMOTEFOLDER/$ZIPNAME.zip $1 fi lftp ftp://$USER:$PWD@$HOST -e "set ssl:verify-certificate no; mirror -R -r -i '$ZIPNAME.zip*' $REMOTEFOLDER /$REMOTEFOLDER; quit"