Shakiba Moshiri
  • Shakiba Moshiri (شکیبا مشیری)
  • opt
    • high traffic site optimization
      • infrastructure check
      • infrastructure test
  • tools
    • Cryptsetup
      • Container encryption using cryptsetup
    • curly
      • ftp
      • ssl
      • http
      • dns
      • ip
      • email
    • SSH
      • ssh password-less login
        • Untitled
    • volumes and FS
      • installing Gluster fs on Ubuntu 18.04 server
      • Accessing Gluster FS from the client machine
  • CDN
    • How does a CDN work
  • Server Panel
  • DirectAdmin
    • DirectAdmin through a reverse proxy
  • Web Server
    • Nginx
      • Live Steaming with Nginx and FFMPEG
  • Security
  • Container
    • Docker Networking 101
      • why docker networking is important?
      • type of networking in docker
    • Docker
      • How to run gitlab-runner with docker
      • using vim inside any container without installing it
      • Cannot connect to the Docker daemon at unix:///var/run/docker.sock
      • moving docker images around using ssh and pipe
      • How can I make docker-compose pull images using a socks5 proxy?
  • Stack Overflow
  • Github
  • vmware
    • tools
      • how to install vmware CLI govc on Linux
  • Windows
    • How to Erase a Recovery Partition in Windows
Powered by GitBook
On this page
  • ftp
  • check
  • mount
  • umount
  • upload
  • download

Was this helpful?

  1. tools
  2. curly

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 action

  • check 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

PreviouscurlyNextssl

Last updated 4 years ago

Was this helpful?