Skip to content

Instantly share code, notes, and snippets.

@jgatjens
Created July 26, 2016 05:19
Show Gist options
  • Save jgatjens/bd3b61783dbe16465a43c4019b8222ef to your computer and use it in GitHub Desktop.
Save jgatjens/bd3b61783dbe16465a43c4019b8222ef to your computer and use it in GitHub Desktop.
change permission to a group of files over FTP terminal using lftp command
#!/bin/bash
echo "---- UPDATE PERMISSION example.net IMAGES ----"
HOST="ftp.example.net"
USER="usernmae"
PASS="password"
FTPURL="ftp://$USER:$PASS@$HOST"
lftp <<EOF
set ftp:ssl-allow no
set ftp:passive-mode true
set ftp:list-options -a
open $FTPURL
chmod -R 0777 --verbose /public_html/images/classes
chmod -R 0777 --verbose /public_html/images/sponsors
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment