[Samba] Execute script on file write
mangoo at wpkg.org
Tue Mar 14 09:45:07 GMT 2006
Peter Fortuin wrote:
> I'm working on a quota system here at school. I want to execute a script
> everytime a user writes on the samba fileserver. This script checks some
> quota stuff.
> My question is, is it possible that a script is executed everytime a
> user writes a file to the samba server and if it's possible, how?
I guess it would be rather hard to achieve this, as Samba doesn't offer
anything like that.
The closest you will find are postexec and preexec directives (a program
will be executed when the user connects/disconnects from a share).
Anyway, something what you're talking about (executing a script on every
file write) could be a major bottleneck for the server.
Just imagine, how many files are in the average user profile...
Is there some special reason you have to execute a script after every
Why don't you just set up quota on your Samba server? The system will
take care of everything.
Additionally, if you're using roaming profiles, you could use the Policy
Editor to limit user profiles (they will get a pop up warning when they
log out if the profile exceeds a value you set, and will be requested to
remove some file).
Software deployment with Samba
More information about the samba