Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function split() is deprecated in /home3/vvaswani/public_html/community/columns/trog/article.php on line 101

Deprecated: Function eregi_replace() is deprecated in /home3/vvaswani/sql.php on line 301

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home3/vvaswani/public_html/community/columns/trog/article.php on line 107

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home3/vvaswani/public_html/community/columns/trog/article.php on line 109

Deprecated: Function ereg_replace() is deprecated in /home3/vvaswani/public_html/community/columns/trog/article.php on line 124

Deprecated: Function ereg_replace() is deprecated in /home3/vvaswani/public_html/community/columns/trog/article.php on line 125

Deprecated: Function split() is deprecated in /home3/vvaswani/public_html/community/columns/trog/article.php on line 127

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174

Deprecated: Function ereg() is deprecated in /home3/vvaswani/db-mysql.php on line 174
The Melonfire Community - Trog
Logo         Community
  Trog
Services
The Company
Community
Columns
Your Account
Contact Us
 
 
Dancing The Samba (part 2)
Learn how to exploit the power of Samba's ancillary utilities.

| What's In A Name? |

In case you're working in an environment that is sensitive to file names, you can use Samba's "name mangling" capabilities to impose a particular set of rules on the filenames it creates. Consider the following addition to the "smb.conf" file, which ensures that the name of every file created on the Samba server is upper-cased.


[global]
        default case = upper
        preserve case = no


Over here, the "default case" attribute sets the default case for new filenames, while the "preserve case" attribute controls whether filenames are preserved as is, or if they are forcefully changed to a different case.

If your server implements disk quotas for users or groups, you can have Samba respect these quotas as well; simply recompile it and, this time, add the "with-quotas" argument to the "configure" script. Once you've got a new Samba binary built and installed, you should find that the system automatically restricts you from using more than your allotted disk space.

Consider the following example, which demonstrates by first setting the quota for the "accounts" group (506) to 2 MB,


$ quotatool -g 506 -b -q 2048 -l 2048  /dev/hda2

$ quota -g accounts
Disk quotas for group accounts (gid 506):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/hda2    1928    2048    2048              0       0       0       


and then attempting to use more than the allotted disk space via the "smbclient" utility:


$ smbclient //olympus/groups
added interface ip=192.168.3.1 bcast=192.168.3.255 nmask=255.255.255.0
added interface ip=192.168.0.77 bcast=192.168.0.255 nmask=255.255.255.0
Password:
Domain=[MEDUSA] OS=[Unix] Server=[Samba 2.2.5]
smb: \> cd accounts
smb: \accounts\> mput samba-latest.tar.gz
putting file samba-latest.tar.gz as \accounts\samba-latest.tar.gz Error writing file: NT_STATUS_DISK_FULL
(326.4 kb/s) (average 326.4 kb/s)
smb: \accounts\>


As you can see, Samba returns a "disk full" error as soon as the group exceeds its allotted quota.


How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.

Read more, or grab your copy now!


previous page more like this  print this article  next page
 
Search...
 
In trog...
Logging With PHP
Building A Quick-And-Dirty PHP/MySQL Publishing System
Output Buffering With PHP
Date/Time Processing With PHP
Creating Web Calendars With The PEAR Calendar Class
more...
 
In the hitg report...
Crime Scenes
Animal Attraction
Lord Of The Strings
more...
 
In boombox...
Patience - George Michael
Think Tank - Blur
My Private Nation - Train
more...
 
In colophon...
Hostage - Robert Crais
The Dead Heart - Douglas Kennedy
Right As Rain - George Pelecanos
more...
 
In cut!...
American Chai
The Core
Possession
more...
 
Find out how you can use this article on your own Web site!


Copyright © 1998-
Strict Standards: mktime(): You should be using the time() function instead in /home3/vvaswani/public_html/community/columns/trog/article.php on line 731
2018 Melonfire. All rights reserved
Terms and Conditions | Feedback