LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-17-2008, 07:25 AM   #1
rafa_gallego
LQ Newbie
 
Registered: Jul 2007
Location: Gijón - Asturias - Spain
Distribution: Fedora & Mandriva
Posts: 11

Rep: Reputation: 0
Executing a script when uploading a file to a SAMBA SERVER


Hi everrybody.

I have set up a samba server with a share to which certain users can upload files. I wonder if it is possible to configure samba in such way that a script is automatically executed when an user uploads a file to the server. This script would have validation purposes such that check the file format, its size and name, etc.
 
Old 01-17-2008, 08:44 AM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,438

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
I do not know any way that Samba could be configured, but you could set up a cron job to run at a regular interval. The script could look for any new files in your Samba share and conduct your checks.
 
Old 01-17-2008, 08:51 AM   #3
rafa_gallego
LQ Newbie
 
Registered: Jul 2007
Location: Gijón - Asturias - Spain
Distribution: Fedora & Mandriva
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by allend View Post
I do not know any way that Samba could be configured, but you could set up a cron job to run at a regular interval. The script could look for any new files in your Samba share and conduct your checks.
Thanks, this is in fact what I have been doing, but I am looking for a better solution. When a user uploads a wrong file to the share, I want the system to act on it inmediately without waiting for a job depending on the cron daemon.

Thanks for your reply.
 
Old 01-17-2008, 05:48 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Try inotify eg http://www-128.ibm.com/developerwork...l-inotify.html
 
Old 01-18-2008, 05:39 AM   #5
rafa_gallego
LQ Newbie
 
Registered: Jul 2007
Location: Gijón - Asturias - Spain
Distribution: Fedora & Mandriva
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
Thankx a lot!!! Inotify is a very powerful piece of sofware that suits me perfectly. I am using the inotify cron system (incron).

Rafa
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
executing perl script through .forward file skverma_in Linux - Newbie 3 10-21-2004 07:24 AM
executing perl script through .forward file skverma_in Linux - General 0 10-18-2004 05:06 AM
executing script via webpage through apache server feetyouwell Linux - Software 7 02-08-2004 03:23 PM
problem uploading file to ftp server hnguy Linux - Newbie 3 11-20-2002 04:16 PM
uploading file from the client to the server Bheki Linux - Newbie 2 06-11-2002 07:16 AM


All times are GMT -5. The time now is 05:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration