Find the answer to your Linux question:
Results 1 to 4 of 4
Hi group, I have posted this question on other forums with no working solutions. Is there a way to limit, on the server side, the size of a sftp or ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    15

    file size limit with sftp and/or scp


    Hi group,

    I have posted this question on other forums with no working solutions.

    Is there a way to limit, on the server side, the size of a sftp or
    scp file transfer?

    I tried to use ulimit but that did not work.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,737
    I've been looking, but to no avail. There doesn't seem to be a file-size limit parameter in any of the config files for the ftp daemons my system supports - ftpd, tftpd, vsftpd.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2005
    Posts
    15

    Looks like a feature request?

    Quote Originally Posted by Rubberman View Post
    I've been looking, but to no avail. There doesn't seem to be a file-size limit parameter in any of the config files for the ftp daemons my system supports - ftpd, tftpd, vsftpd.
    So whom do we ask to impliment this 'new feature'?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,737
    Quote Originally Posted by MrUmunhum View Post
    So whom do we ask to impliment this 'new feature'?
    Get the source for your favorite ftpd implementation and modify it. If you need it badly enough to pay to have it done, contact me via private message. I've done complete implementations of the FTP and TELNET protocols (client and server) from the Whitebook RFC specs in the past, and contract software is what I do.

    In any case, the ftp client sends the size of the file it is transferring to the server, which can check it's limit settings and return an error if the size is excessive. The things that would have to be done is to add a maxsize parameter to the configuration file, code to parse that in the server, a server variable to hold that value, and code in the server's SIZE command/option handler(s) to validate the value sent from the client.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •