3

I use this script (launching lftp with some options) to mirror a local folder and a website.

#!/bin/bash    
HOST="myhost.com"
USER="user"
PASS="xxxxxx"
lftp -c "set ftp:list-options -a;
set cmd:fail-exit yes;
open ftp://$USER:$PASS@$HOST;
lcd /home/user/websites/A;
cd /;
mirror --reverse \
   --delete \
   --verbose;"

My problem is, on some websites, I have the error "MFF and SITE CHMOD are not supported by this site"

I believe it is not a very important error. It just says that I have no right to set the permissions to the ones of my local files.

How can I disable this error message?

1
  • try -p option in your command
    – Morteza
    Dec 16, 2018 at 6:59

1 Answer 1

-1

Whenever you want to ignore error for output of a script just add || true at the end.

./shell/Script/to/run.sh ||true

if you want to make the exit code without any error, turn on pipefail.

2
  • 2
    This is only useful if you're comfortable suppressing all errors.
    – Simon
    Dec 14, 2018 at 14:10
  • 1
    The question asks “How can I disable this error message?” (emphasis added),  not “How can I make my script ignore the error status from the lftp command?” Sep 15, 2020 at 22:14

You must log in to answer this question.

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