Is there any possibilities to restrict Samba user's to a maximum file size?
Ex, If a samba-user uploads a file onto the server that's more than 100 MB (like video or compressed files), Samba, or the system receiving the file, should not allow it.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
So there is a solution.
Considering Samba share size = 10GB
If you want an user not to use more than 1GB then you can use user quota management as described here
Now as of your question, you need to restrict copy and paste of your samba users, then follow the steps here,
# vi /etc/security/limits.conf
Edit this configuration file and append like this to all user whom you need to restrict
savvy hard fsize 102400
So the samba user
savvy cannot file transfer beyond 100MB.
For the changes to take effect logout and log back in or restart your system.
It's an old post, but just in case someone stumbles on it it's good to know that Ruban Savvy's recipe doesn't work (anymore ?), so don't spend too much time on it. At least it's not working on Samba 4. I got a straight answer from the Samba team (the full discussion can be found on the Samba's February mailing list, https://lists.samba.org/archive/samba/2021-February.txt.gz, grep for "limits.conf" to get to the relevant mails)
If someone has an idea it would be great, but according to my research it's basically not possible to limit the size of individual files on a Samba share (nor is it possible on a Windows Server).