I've been working with an install of Ubuntu 8.04 and Samba.

I'm trying to set up user disk space quotas for our shared drive. That is, each user will have their own folder on our Network Attached Storage (NAS) that has a size limit. I can successfully mount the shared drive, but I can't figure out how to set quotas on it (I think smbcquota might work, but I'm not sure).

It's been suggested to me to give each user a share on the shared drive or to use NFS. Unfortunately, neither option works for my purposes.

Does anyone know how I could give users a quota on my NAS?

  • what NAS device are you using? – warren Jul 7 '10 at 22:55
  • I'm using a Buffalo Linkstation. However it doesn't seem to support quotas, so I'm hoping that quotas can be enforced by Samba in some way or another. – graf_ignotiev Jul 7 '10 at 23:34

For Samba to support quotas, there must be few preconditions met: Samba must be compiled with quota support, the FS being shared must support quotas and have the quotas enabled.

To turn on quotas you need to:

  1. Add usrjquota=aquota.user,jqfmt=vfsv0 to mount options in /etc/fstab and create a aquota.user file in root directory of file system (if it's a /home FS, you can create it using touch /home/aquota.user.
  2. Re-calculate current disk usage with

    quotacheck -vguma

To set the quotas you may use either quotactl, quota and similar Linux tools or connect to the share as root (no other user will work, including the ones defined in admin users) and use the windows share properties to change quotas.


I think that googling would have helped you. Try using this tutorial


and check-out Samba SWAT

  • Thanks for the link, but I'd already read it. The problem with that tutorial is that it applies to local file systems (in their case ext3). I need something for CIFS. This is what my entry in fstabs looks like: \\linkstation\share /media/share cifs workgroup=DLLAB,fmask=777,uid=1002,ip=,dmask=777,usrquota,credentials=/etc/.credentials 0 0 The GUI that I'm working with can be found here: turnkeylinux.org/domain-controller – graf_ignotiev Jul 8 '10 at 20:55
  • \\linkstation\share /media/share cifs workgroup=DLLAB,fmask=777,uid=1002,ip=,dmask=777,usrquota,credentials=/etc/.credentials 0 0 – graf_ignotiev Jul 8 '10 at 23:19

From what I've learned, what I want is not possible. If my NAS supported NFS or if it supported quotas locally, I could probably get it to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy