Enhancement Suggestion

Shane Hunsley shane at hunsley.demon.co.uk
Wed Jun 23 22:42:28 GMT 1999


Hello

Would it be possible to add the following functionality to the Samba code.

What I'm looking for is the ability to execute a shell script whenever a
file has been "created". This would be a share specific parameter called
possibly "creation event script".

What I want to achieve is to create service specific shares e.g. a share
specifically to create zip files. The user would drag and drop the files
onto the share and the specified shell script will receive though variable
substitution the file name and compress each file using a zip program and
then possibly delete the original file leaving only the .zip file for each
of the files.

Other examples that could use this idea include a file converter e.g.
foo.jpg to foo.ps, an unzip share being the opposite of the zip share
leaving the user to then move the uncompressed files elsewhere, an automated
ftp transfer to specific sites. Other "events" like renaming and deleting
would also be useful e.g. an indexing engine for html or even (shudder)
Office 2000 HTML documents.

I realise some of this could be done with shell scripts and the cron daemon
but the events method allows for more controlled execution.

Please understand I'm not looking for Samba to actually do the work e.g
compression but only to pass the name of the file created to the specified
shell script used to action the event. The shell script will be responsible
for all the work. It would also be responsible for any logic decisions such
as not compressing .zip or .jpg files and in those cases the file would be
left. The shell script could then send an e-mail informing the user the
zipping or unzipping or whatever task was required has completed. Also the
use of shell scripts leaves the actual implementation in the hands of the
System Administrator.

This idea came about when I our ISDN link was up for long periods because of
users sending extremely large attachments. It turns out many of our users
find compressing documents a difficult task. The idea of drag and drop files
onto a Samba share and the zip files being created for them so they can them
drag and drop into Outlook is very interesting. It is certainly not
something that can be done easily with NT.

I welcome any comment on this concept.

Regards,
Shane Hunsley
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba-technical mailing list