pure-ftpd-mysql and incomplete image

Discussion in 'Server Operation' started by Gigabyte2, Jan 22, 2021.

  1. Gigabyte2

    Gigabyte2 New Member

    Hi.
    I have a problem with pure-ftpd-mysql inside my ISPConfig 3.1.12 server.
    I'm uploading a picture (300-150kb) from a webcam via FTP but the picture uploaded in the most cases is incomplete.
    I've tried to upload from the same webcam to another server (vsftpd) and everything is perfect!
    What issue can be?

    Best regards
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    By incomplete, you mean only part of the file gets uploaded, or ?

    Check logs/debug messages, both on the ftp server and client.
     
  3. Gigabyte2

    Gigabyte2 New Member

    This is how some images are uploaded:
    Camera doesn't have any log inside, but in the ftp server everything seems to be fine. Let's see the log of a image transfer:
    [​IMG]
    https://imgur.com/mXPgk12
    [​IMG]
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What is the size of the image file? Is it 166624 bytes? How much of the file does get transferred? How much disk is free on the target?
     
  5. Gigabyte2

    Gigabyte2 New Member

    Yes there is a lot of free space and the image is near 200-250kbps
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What are all those permission denied things?
    Can you create 250 KB file in that directory by other means?
     
    Last edited: Jan 22, 2021
  7. Gigabyte2

    Gigabyte2 New Member

    Yes there are other FTP sessions that upload larger files with no problem.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you examined the log files in /var/log/pure-ftpd/ ?
     
  9. Gigabyte2

    Gigabyte2 New Member

    Yes, I've posted the output in a post above.
     
  10. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Well if you got a partial upload, the ftp passive port setup is working. When uploading a file, the ftp server simply opens a port, and whatever is sent to that port by the client (webcam) is saved as the file contents; when the connection is closed, all data received will be written to the file. To dig in further, I'd try capturing network packets at points starting from the client side and see what you find out. It might be useful to disable TLS and set a temporary ftp password for this, then restore both later when you're done.

    Digging into the packet captures is as much an art as a science, if you're completely lost here, you might try internet searches for your specific camera and network router/gear, maybe someone else has posted something similar. Heck, you might put your webcam info here and ultimately the solution for others to find in the future, too.
     
    ahrasis likes this.
  11. Gigabyte2

    Gigabyte2 New Member

    Nothing change with TLS set to 0.
    The connection receive a logout as you can see in the log below and then retry to connect with success:

     
  12. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I meant disable TLS while performing your packet captures, so you can make more sense of the data in the packets.
     
  13. Gigabyte2

    Gigabyte2 New Member

    Ok, understand, thank you. I'll try.
    Can you notice something strange in the log attached?
     
  14. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    No. I mean it is strange that the webcam would run through 2 times attempting to create a directory hierarchy that already exists, but that's probably unrelated. :)
     
  15. Gigabyte2

    Gigabyte2 New Member

    I've tried everything but the issue still! Could be a pure-ftpd-mysql problem?
    Everything works fine in another server running vsftpd.
     

Share This Page