0 votes
by (120 points)
reshown by

Is there a way that I can see how big the file is a user is trying to upload via SFTP so i can reject the request before it even starts? I know there is a Max Bytes i can use for a session, but that doesn't seem to work the way i want it to. I am hoping to implement a Quota-type setup for a user where i reject the Upload if it's over a certain file size.

Applies to: Rebex SFTP, File Server

1 Answer

0 votes
by (144k points)

Unfortunately, the SFTP protocol itself lacks capabilities to achieve this. In SFTP, a file upload consists of series of small requests (open/write/write/write/.../close), which means that the final file size is only known when the file has already been uploaded and is being closed. Sorry!

Despite its name, SFTP is actually not a file transfer protocol (like FTP, for example), but rather a simple remote file system protocol (modeled to mostly match POSIX filesystem API).

...