Author Topic: Unable to get quotas on shares working  (Read 3912 times)

browley

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +1/-0
    • View Profile
Unable to get quotas on shares working
« on: September 11, 2012, 08:37:35 pm »
Hi All,

I am having a bit of troubles with quotas.  Basically, I want to have shares without quotas to remove a NAS device that is used as a shared drive now.  That said, in the Zentyal dashboard, I have disabled user quotas through Users and Groups -> User templates.  I then go to add a share.  The permissions on the share work fine but the share itself still has a 100mb quota.  Am I missing something?  Also, for those wondering, there is no place to set the quota under File and Sharing -> General Settings.  Wondering if it was a samba limitation, I tried the following:
Code: [Select]
$ sudo smbcquotas -L //127.0.0.1/<share>  -U <admin user>
Quotas are not enabled on this share.
Failed to open \$Extend\$Quota:$Q:$INDEX_ALLOCATION  NT_STATUS_ACCESS_DENIED.

Any ideas?  Just a note: my server is an AD-Sync'ed machine providing DNS and hopefully shares soon @ 2.2.7 core.  Thanks in advance.

browley

  • Zen Apprentice
  • *
  • Posts: 17
  • Karma: +1/-0
    • View Profile
Re: Unable to get quotas on shares working
« Reply #1 on: September 25, 2012, 05:18:11 pm »
Well, after searching a bit, I found this, http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch28_:_Managing_Disk_Usage_with_Quotas#Edit_The_User.27s_Quota_Information.  Which led me to this:

Code: [Select]
sudo edquota -u <my username>
So now I can connect to shares without the 100mb limit issue.  Here's the real issue: I have user quotas disabled through the Zentyal Dashboard (I'm assuming Users and Groups-> User Template -> Default user quota: Disabled), so something is not being flipped, even after I've tried changing it on/off. 

Also, to note, this is not a user share, so why would my user have a quota?  I would expect users to have quotas on their home shares, but not a regular share?  Is the user quota supposed to be a gobal thing across all shares?  To me that doesn't really make sense from an admin standpoint.

Also, for kicks, I took a look to see if the share had Group Quotas set:

Code: [Select]
root@samba:/var/log# sudo edquota -g /home/samba/shares/<share>/
edquota: group /home/samba/shares/techops/ does not exist.

So, the next thing was to look at /etc/fstab according to the link:
Code: [Select]
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/samba-root /               ext4    errors=remount-ro,usrquota,grpquota,acl 0       1

Bingo, I see the userquota is enabled there.  So, I am debating here, but if I want to just disable quotas for everyone in one shot, should I just pull the userquota from the above?  Any guidance would be very much appreciated.

B0UJI

  • Zen Apprentice
  • *
  • Posts: 30
  • Karma: +3/-0
    • View Profile
Re: Unable to get quotas on shares working
« Reply #2 on: October 03, 2012, 05:06:17 am »
Yeah i noticed this too.  It seems in Zentyal3 the "User Quota" switch applied not just for home directories but the whole system which is kind of odd!  I definately would like to restrict Home Shares, but not access to our main shares!

jwilliams1976

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +1/-0
    • View Profile
Re: Unable to get quotas on shares working
« Reply #3 on: March 12, 2013, 05:39:45 pm »
In case someone else has problems like I did I wanted to reiterate how the quota system works on Zentyal 3.0. There is no per share quotas in Zentyal or Samba/Linux for that matter. When you set a user quota via the "User Template" the disk quota applies to all users created from that point forward. It applies to ALL files that the user owns, not just in their home directories. There is no way to remove a quota from a user once they have been created through Zentyal. You must manage user quotas through the command line. There are plenty of guides on doing that if you search around. Be advised that there is no per user warnings through Zentyal or Windows so be careful. When a user reaches their quota it will just say the disk is out of space.