Difference in file listing for SSH and SFTP

5,666

Pics or id didn't happen. Sorry, but it is really difficult to believe.

I do not use Filezilla, so I'm not sure how it works, but the only scenario, that I can think of, which would explain the described behaviour would hinge on:

  1. Filezilla queueing a file for transfer, but showing it as present on the remote site (which would be a bug IMO). Therefore it shows you the file as transferred, before it really is.
  2. Filezilla not refreshing directory content when a new entry is added. Therefore it would not know about new entries until it refreshed the view. This isn't anything bad, as long, as the refreshing of directory listing work, you claim that it does not. Another bug?

If you are sure, that the problem isn't caused by lack of sleep/low caffeine and/or blood sugar level, then it would help if you documented the whole scenario:

  1. ssh to the server.
  2. Create an empty directory. Name it something unique, including a timestamp, e.g. /tmp/fz-hostname-YYYYMMDD-hhmm. cd into that directory.
  3. Use Filezilla to access the directory.
  4. Now we are sure, you access the same directory on the same server using both methods.
  5. From ssh do touch newfile; sync; ls -al. We will see the new file created, with a timestamp.
  6. In Filezilla force a directory listing refresh. I don't know how, maybe there's a "refresh" button, maybe (extreme case) you'll need to close the program and re-open on a different machine (only joking, I don't think they are caching remote directory entries locally; or are they?).
  7. See that you can see the newfile.
  8. Transfer a testfile from local station to the remote location. Double check that the transfer completed.
  9. Do ls -al in ssh session. Verify that you see testfile.

If it still doesn't work, open a bug ticket for Filezilla.

Share:
5,666

Related videos on Youtube

Ramone
Author by

Ramone

Updated on September 18, 2022

Comments

  • Ramone
    Ramone almost 2 years

    I have SSH access to a server and I have never bothered to use SFTP until now.

    I transferred a file using FileZilla to the server. However, the weird thing is that the file doesn't show up when I SSH into the server and do a ls or even a ls -a (just in case).

    The vice versa is also true, when I SSH, I am able to see the file I created via SSH access. However, when I fetch the directory listing via SFTP, that file is nowhere to be seen!

    What is the reason for this -- files created via SSH and SFTP are not shown in the directory listing of each other?

    • Mat
      Mat almost 13 years
      That makes no sens at all. Are you certain you're looking at the same directory, on the same server?
    • Ramone
      Ramone almost 13 years
      Yes. I have tried everything I could.
    • Ramone
      Ramone almost 13 years
      Sorry found the problem. It was the wrong server :)
    • Mat
      Mat almost 13 years
      Don't worry, you're not the first person this has happened to :>
  • Xenos
    Xenos almost 8 years
    I was wondering why ls -l does not show my .htaccess while FTP does... I forgot the -a flag... Thanks!