Linux limited size shared folder

How 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 .
ahfarisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BuckmeisterCommented:
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
0
ahfarisAuthor Commented:
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
0
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
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/xfs_quota
      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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.