[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: samba VFS Quota or Quota tool



On Thu, 12 Apr 2012 14:26:53 +0500, Muhammad Yousuf Khan wrote:

> i am about to apply quota limits on samba share. and i am confuse as
> what i can see so far is that i have two option to look into one is VFS
> which is embedded module and support Quota but the problem is, all the
> documents are very complex to understand i at least need an example for
> multiple share folders. if some one who is previously using VFS and can
> share his/her config file for example purpose only. i would be very
> thankful.

I can help you with the global concept but no with a sample configuration
file, that's something you'll have to find out.

To setup quotas in samba you basically need setup two things:

- Enabling quotas for the mount point that holds the stored data (which
usually means installing "quota" and "quota tool" packages).

- Enabling samba quotas by configuring the corresponding samba VFS module.

(there are many guides and information on how to setup these two things on
the Internet...)

Remember that samba acts like a "glue" and knows little to nothing about
users/groups/filesystems and relays on "mapping" (linux → windows) to
mimic the Windows settings.

> Secondly, Quota tool. is a partition base quota service not folder base.
> and i only have 1 partition and want to assign multiple share to single
> users-with-quota-limit which means multiple partitions. and that is what
>  i currently don't have. but i know Linux always have workaround for
> everything :) thats why i love Linux, so is there any thing i can do in
> this matter?

AFAIK, quotas can be applied to users/groups and to hard disk
volumes. What you can do in your case is restricting your user's quota
space and apply the restriction to the whole samba share volume. To get
this working well, you will have to play with users/grous permissions and 
put special care in having a perfect mapping between samba (windows) 
users/groups and your linux users/groups but still that can't be enough.

Another thing you do is discarding the use of quotas in the samba share 
and monitor the available disk space in the linux volume, warning the 
admin when the disk capacity reaches a defined percentage of use.

To make samba useful, what I usually do is keeping things as simple as 
possible and create different directories for different purposes, for 
instance:

- One (general) big pool directory where all users can read/write.

- Per user (specific) directories available only to their owners (kinda
private user dirs for their stuff).

- Hidden (non browseable) and protected directories where only root can
access to store, e.g., the bakcup files.

But designing and defining a good policy for samba to fit your network
requirements is not a simple task and requires high doses of trial and
error tests, fighting with users and permissions before you can put it
under production.

> and being a newbie. i would like to ask one more thing that which of the
> facility i should use, VFS or Quota tool, as i am not aware of the
> market right now that which one is more popular and mostly people are
> using. any suggestion in that should be appreciated.

AFAICT, you need both.

Greetings,

-- 
Camaleón


Reply to: