Yes i use smb and want to set quota per folder not per user , so the folder will not exceed specified size no matter who access and save to it
Main Topics
Browse All TopicsHow to specify shared folder size in linux for all users , I don't mean user quota I mean one folder with specific size limit for all user .
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Quotas are a function of the filesystem being used...
- If you format and mount the drive in FAT32, there is no quota option at all!
- If you format and mount the drive in EXT3, there is a quota system available SOLELY for the entire filesystem
- NOTE: You could also create "virtual" filesystems within that environment -- lots of overhead, little value (IMHO)
- If you format and mount the drive in XFS, you can create quotas for any part of the "directory tree"
- See http://linux.die.net/man/8
and scroll down to the "Directory Tree Quota" portion of the man page
This should give you what you want... however, to make it CLEANER, you'll also want to re-compile Samba with the Quota options on (so Samba will be able to properly report quota info to users, instead of just "failing" when they go over quota -- and you KNOW they will!)
See the output of "smbd -b | grep QUOTA" and you should get lines that read:
HAVE_SYS_QUOTA_H # this is for the system headers to access Quotas
HAVE_LINUX_XFS_QUOTAS # 1 of 2 XFS entries you need to see
HAVE_QUOTACTL_LINUX # which allows Samba Admins to adjust quotas
HAVE_SYS_QUOTAS # turns on Samba's Quota interface for EXT2 / ETX3
HAVE_XFS_QUOTAS # turns on Samba's Quota interface for XFS
WITH_QUOTAS # shows how you turned on the above! :-)
If you don't have the HAVE_* lines above, then you'll need to re-compile Samba WITH them! (And that's a lot more work than I'm showing in this posting!)
Good luck!
Dan
IT4SOHO
Business Accounts
Answer for Membership
by: BuckmeisterPosted on 2009-07-04 at 05:17:34ID: 24776712
Hi ahfaris,
what do mean with shared?
Is it shared over the network via NFS or SMB etc. or do multiple local users share this folder?
Kind Regards,
Buckmeister