Samba List: Is it possible to limit what filename extensions can be stored in a samba share? We use samba to allow our windows web designers to use drag and drop when deploying new pages on our website. We want to be able to limit which filename extensions can be saved to these shares. Is this possible and if not and alternatives? Bruce Embrey
Yes, and very useful it is too :-) In the Globals section I put this to stop all users cluttering up the server with mp3 files. You can put it in each required share definition rather than globals though. veto files = /*.mp3/ basically it starts with a / then file name and type and then ends with / so, veto files = /*.bat/*.scr/mike.*/ would stop all bat and scr files, and any file called mike with any ext. I use SWAT for configuring my Samba shares and the help file explains it well. HTH Mike ----- Original Message ----- From: "Bruce Embrey" <embrey@hood.edu> To: <samba@lists.samba.org> Sent: Thursday, July 08, 2004 2:36 PM Subject: [Samba] Restricting file types Samba List: Is it possible to limit what filename extensions can be stored in a samba share? We use samba to allow our windows web designers to use drag and drop when deploying new pages on our website. We want to be able to limit which filename extensions can be saved to these shares. Is this possible and if not and alternatives? Bruce Embrey -- To unsubscribe from this list go to the following URL and read the instructions: lists.samba.org/mailman/listinfo/samba --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (grisoft.com). Version: 6.0.712 / Virus Database: 468 - Release Date: 28/06/2004
There are two points I would make about using veto files. First of all there is a performance hit when using it. I know that's probably not going to be a problem when you're talking about a file server, but anyone else should bear it in mind. Secondly, there is nothing stopping your people renaming files to get them onto the web servers (e.g. upload mp3s as "songname.haha" then use a very simple perl CGI script to read the file in and pass it to web browsers under a different name, or they could upload Windows EXE files in ZIP files etc...). I know it's being padantic, but hey - it might be useful to know in the future. ;) Mark Lidstone IT and Network Support Administrator BMT SeaTech Ltd Grove House, Meridians Cross, 7 Ocean Way Ocean Village, Southampton. SO14 3TJ. UK Tel: +44 (0)23 8063 5122 Fax: +44 (0)23 8063 5144 E-Mail: mailto:mark.lidstone@bmtseatech.co.uk Website: bmtseatech.co.uk ========================================================================Confidentiality Notice and Disclaimer: The contents of this e-mail and any attachments are intended only for the use of the e-mail addressee(s) shown. If you are not that person, or one of those persons, you are not allowed to take any action based upon it or to copy it, forward, distribute or disclose the contents of it and you should please delete it from your system. BMT SeaTech Limited does not accept liability for any errors or omissions in the context of this e-mail or its attachments which arise as a result of Internet transmission, nor accept liability for statements which are those of the author and not clearly made on behalf of BMT SeaTech Limited. ======================================================================== -----Original Message----- From: Mike Stewart [mailto:mike@powys-training.co.uk] Sent: 08 July 2004 16:03 To: embrey@hood.edu; samba@lists.samba.org Subject: Re: [Samba] Restricting file types Yes, and very useful it is too :-) In the Globals section I put this to stop all users cluttering up the server with mp3 files. You can put it in each required share definition rather than globals though. veto files = /*.mp3/ basically it starts with a / then file name and type and then ends with / so, veto files = /*.bat/*.scr/mike.*/ would stop all bat and scr files, and any file called mike with any ext. I use SWAT for configuring my Samba shares and the help file explains it well. HTH Mike ----- Original Message ----- From: "Bruce Embrey" <embrey@hood.edu> To: <samba@lists.samba.org> Sent: Thursday, July 08, 2004 2:36 PM Subject: [Samba] Restricting file types Samba List: Is it possible to limit what filename extensions can be stored in a samba share? We use samba to allow our windows web designers to use drag and drop when deploying new pages on our website. We want to be able to limit which filename extensions can be saved to these shares. Is this possible and if not and alternatives? Bruce Embrey -- To unsubscribe from this list go to the following URL and read the instructions: lists.samba.org/mailman/listinfo/samba --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (grisoft.com). Version: 6.0.712 / Virus Database: 468 - Release Date: 28/06/2004 -- To unsubscribe from this list go to the following URL and read the instructions: lists.samba.org/mailman/listinfo/samba
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What about a means of preventing ALL files except a few types? I would like to keep users from saving files to thier desktops that are not shortcuts. Jim C. | Is it possible to limit what filename extensions can be stored in a | samba share? We use samba to allow our windows web designers to use drag | and drop when deploying new pages on our website. We want to be able to | limit which filename extensions can be saved to these shares. Is this | possible and if not and alternatives? - -- - ----------------------------------------------------------------- | I can be reached on the following Instant Messenger services: | |---------------------------------------------------------------| | MSN: j_c_llings@hotmail.com AIM: WyteLi0n ICQ: 123291844 | |---------------------------------------------------------------| | Y!: j_c_llings Jabber: jcllings@njs.netlab.cz | - ----------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3-nr1 (Windows XP) Comment: Using GnuPG with Mozilla - enigmail.mozdev.org iD8DBQFA7ZST57L0B7uXm9oRArl3AJ42ipXd/xivVWYy+w9moalamSiytwCaA1tG ZgNWQEGQclWu1XcOovQQdEg=qK7K -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What about files over a certain size? That is really what I need. Jim C. | Is it possible to limit what filename extensions can be stored in a | samba share? We use samba to allow our windows web designers to use drag | and drop when deploying new pages on our website. We want to be able to | limit which filename extensions can be saved to these shares. Is this | possible and if not and alternatives? - -- - ----------------------------------------------------------------- | I can be reached on the following Instant Messenger services: | |---------------------------------------------------------------| | MSN: j_c_llings@hotmail.com AIM: WyteLi0n ICQ: 123291844 | |---------------------------------------------------------------| | Y!: j_c_llings Jabber: jcllings@njs.netlab.cz | - ----------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3-nr1 (Windows XP) Comment: Using GnuPG with Mozilla - enigmail.mozdev.org iD8DBQFA7ZfX57L0B7uXm9oRApE1AJ4qO1e9p2bE9oVtVRQIJKnV46zwwwCeNWmQ Yb0Q+fnCI9AySDg27mUfhqs=H8o3 -----END PGP SIGNATURE-----
This works well for file servers only, but there is a way round it which might be good to bear in mind - Say you have blocked /*.php/*.asp/ to prevent samba users making scripts on your web server (i am guessing that you have shared your webroot?) Now make a php file, rename it to file.txt and move it to the server - no problem. Once it is on the server, rename it to file.php. The file disappears, but only to samba users - the file is still there named file.php and can be accessed by anything other than samba (ie apache) Mike Stewart wrote:>Yes, and very useful it is too :-) > >In the Globals section I put this to stop all users cluttering up the server >with mp3 files. You can put it in each required share definition rather than >globals though. > >veto files = /*.mp3/ > >basically it starts with a / then file name and type and then ends with / > >so, veto files = /*.bat/*.scr/mike.*/ > >would stop all bat and scr files, and any file called mike with any ext. > >I use SWAT for configuring my Samba shares and the help file explains it >well. > >HTH > >Mike > > >----- Original Message ----- >From: "Bruce Embrey" <embrey@hood.edu> >To: <samba@lists.samba.org> >Sent: Thursday, July 08, 2004 2:36 PM >Subject: [Samba] Restricting file types > > >Samba List: > > > >Is it possible to limit what filename extensions can be stored in a >samba share? We use samba to allow our windows web designers to use drag >and drop when deploying new pages on our website. We want to be able to >limit which filename extensions can be saved to these shares. Is this >possible and if not and alternatives? > > > >Bruce Embrey > > > > >