On 21 September 2013 17:07, <joso...@hush.com> wrote: > Is it possible to limit the accepted file size of any uploaded file by > configuring the ftp or the sftp server (OpenBSD 5.3/amd64)? >
You can do this on a per-user basis with a login class (man login.conf, then man useradd) but the user experience is not exactly ideal. I set a filesize limit of 1048576 bytes, then uploaded a file: sftp> put /usr/share/dict/web2 Uploading /usr/share/dict/web2 to /home/uploader/web2 /usr/share/dict/web2 100% 2435KB 187.3KB/s 00:13 Connection closed /home/uploader/web2 was indeed limited to 1048576 bytes. John