ftp
ftp troubleshooting with curly
ftp
-F | --ftp FTP actions ...
| check: checking FTP connection
| mount: mount over FTP
| umount: umount: umount FTP mount point
| upload: upload: upload to a FTP account
| download: download: download from a FTP account
| --fc ftp configuration file
| --fmp ftp mount point (local machine)
| --fl ftp local file for upload
| --fr ftp remote path
actions for FTP
check
mount
umount
upload
downlaod
check
check the connection to the FTP account
what these options mean
--ftp
is the receiver of the actioncheck
is the action--fc
reads the configuration file
root[0]shakiba:/pp# curly --ftp check --fc conf/dl.amozeshsabz.ir
drwx--x--- 7 ftp ftp 4096 Jul 26 14:06 .
drwx--x--- 7 ftp ftp 4096 Jul 26 14:06 ..
-rw-r--r-- 1 ftp ftp 18 Apr 1 2020 .bash_logout
-rw-r--r-- 1 ftp ftp 193 Apr 1 2020 .bash_profile
-rw-r--r-- 1 ftp ftp 231 Apr 1 2020 .bashrc
drwx--x--x 3 ftp ftp 4096 Jul 13 11:26 domains
drwxrwx--- 3 ftp ftp 4096 Jul 13 11:26 imap
drwxrwx--- 2 ftp ftp 4096 Jul 13 11:26 Maildir
drwxrwx--- 2 ftp ftp 4096 Nov 9 00:17 .php
lrwxrwxrwx 1 ftp ftp 42 Jul 13 11:26 public_html -> ./domains/pz11313.parspack.net/public_html
-rw-r----- 1 ftp ftp 98 Jul 13 11:26 .shadow
-rw-r--r-- 1 ftp ftp 26 Jul 13 15:09 test-file.txt
drwx------ 2 ftp ftp 4096 Jul 13 11:26 tmp
option: ftp
action: check
status: OK
mount
mount an FTP account to work with it on our local machine
root[0]shakiba:/pp# ls ftp/1
exit 0
root[0]shakiba:/pp# curly --ftp mount --fc conf/dl.amozeshsabz.ir --fmp ftp/1
option: ftp
action: mount
status: OK
exit 0
root[0]shakiba:/pp# ll !$
ll ftp/1
total 48
drwxr-xr-x 1 root root 1024 Jan 1 1970 ./
drwxr-xr-x 14 root root 4096 Jul 4 20:43 ../
-rw-r--r-- 1 root root 18 Apr 1 2020 .bash_logout
-rw-r--r-- 1 root root 193 Apr 1 2020 .bash_profile
-rw-r--r-- 1 root root 231 Apr 1 2020 .bashrc
drwx--x--x 3 root root 4096 Jul 13 12:26 domains/
drwxrwx--- 3 root root 4096 Jul 13 12:26 imap/
drwxrwx--- 2 root root 4096 Jul 13 12:26 Maildir/
drwxrwx--- 2 root root 4096 Nov 9 00:17 .php/
lrwxrwxrwx 1 root root 42 Jul 13 12:26 public_html -> ./domains/pz11313.parspack.net/public_html/
-rw-r----- 1 root root 98 Jul 13 12:26 .shadow
-rw-r--r-- 1 root root 26 Jul 13 16:09 test-file.txt
drwx------ 2 root root 4096 Jul 13 12:26 tmp/
exit 0
root[0]shakiba:/pp#
umount
umount the path we already mounted e.g. ftp/1
usrname && password have been removed from the output
root[0]shakiba:/pp# df -h | grep ftp
curlftpfs#ftp://***:***dl.amozeshsabz.ir/ 954G 0 954G 0% /pp/ftp/1
exit 0
root[0]shakiba:/pp# ls ftp/1
domains imap Maildir public_html test-file.txt tmp
exit 0
root[0]shakiba:/pp# curly --ftp umount
WARNING ...
With 'umount' ftp a 'mount point' is required.
Use '--fmp' with a path.
exit 2
root[0]shakiba:/pp# curly --ftp umount --fmp /pp/ftp/1
option: ftp
action: umount
status: OK
exit 0
root[0]shakiba:/pp# ls /pp/ftp/1
exit 0
root[0]shakiba:/pp#
upload
download
Last updated
Was this helpful?