I do the sftp-server on linux (Debian). I want to make these settings: 1) The user uploads files to the server using the sftp protocol (and to be honest, uploads the video stream to the server) to his home directory. 2) The user can not do anything except upload files to the server (he can not delete or modify files). 3) The restriction for the user's home directory is 50MB (that is, it cannot load files more than 50MB in total)

How do I implement this?

1 answer 1

Quotas on home directories through a regular quota mechanism ( apt-get install quota quotatool ) plus a small self-written script, for example, for iwatch (there are other implementations of working with inotify) that looks at the video file closure in users' home directories or not. If the file is needed, it immediately takes it away from where it is required for further processing. Well or not, since the user does not have to download a total of more than 50 megabytes.