Created
July 26, 2016 05:19
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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