• Using “put” command in psftp gives “no such file or directory”

    My guess is that you're not in the correct local path, to find out where is your current directory at your local machine, use: lpwd.
    If you where in a wrong path then use lcd to move into correct path for example:
    lcd ~/Desktop
    
    Know to make sure all your files are in place use: lls to get a list of your local files. or even something like this:
    lls blankfile.txt
    
    To make sure it's there. then you can use put to start uploading it to remote machine:
    put blankfile.txt
    
    If you've been encountered to any permission error, use pwd command to find out where you are at your remote machine.
    If you are in a path like /var and you did sftp with a normal user, it's obvious that you can't upload your files there, in this case you will get an error like:
    remote open("/root/blankfile.txt"): Permission denied
    
    Use cd command to change into a directory that you are permitted to write and then use putcommand.
    The other permission issue that could happen is your local file permission, which will produce:
    Couldn't open local file "blankfile.txt" for reading: Permission denied
    
    Check your local file permission with lls -l blankfile.txt, make sure your current user at your local machine has a right to read that file.

    To delete a file on the server, type "del" and then the filename. Syntax: psftp> del filename.
  • 0 comments:

    Post a Comment

    FAVOURITE LINE

    To steal ideas from one is plagiarism. To steal from many is Research.

    ADDRESS

    Mumbai , Maharashtra

    EMAIL

    shikha.pathak6@gmail.com
    shikha.the.swt.pari@gmail.com

    Skype

    shikha_pari