Author Topic: Change File Share Quota  (Read 10065 times)

goose

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Change File Share Quota
« on: September 25, 2009, 01:26:37 am »
My users need more space on a file share drive. How can I change the file share quota limit AFTER I have already created and used the share?

dragonslayr

  • Zen Warrior
  • ***
  • Posts: 157
  • Karma: +1/-0
    • View Profile
Re: Change File Share Quota
« Reply #1 on: September 25, 2009, 02:54:58 pm »
My users need more space on a file share drive. How can I change the file share quota limit AFTER I have already created and used the share?

If you edit a user, at the very bottom, you should see. Disk quota limit (MB) ____

Are you not seeing this?  Or may it's not working?

goose

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Change File Share Quota
« Reply #2 on: September 25, 2009, 03:56:38 pm »
Yes, I see that quota limit for individual users, but that value just affects a users "home" share and not any other shares, right?

I need to increase the quota for a single share that is accessed by multiple users.

Thanks

dragonslayr

  • Zen Warrior
  • ***
  • Posts: 157
  • Karma: +1/-0
    • View Profile
Re: Change File Share Quota
« Reply #3 on: September 26, 2009, 07:18:22 am »
I don't know. Sorry I'm not more helpful.

thomas

  • Zen Monk
  • **
  • Posts: 67
  • Karma: +1/-0
    • View Profile
Re: Change File Share Quota
« Reply #4 on: September 26, 2009, 03:04:28 pm »
I think you have to do it by hand. I don't know if it will break anything, but it souldn't as the quotas apply in the filesystem.
A google search for ubuntu - quota, will give you a lot of results.

I think that you must enter one or two commands in terminal.
Anyway. It would be a nice addition if the developers add it in the gui

dragonslayr

  • Zen Warrior
  • ***
  • Posts: 157
  • Karma: +1/-0
    • View Profile
Re: Change File Share Quota
« Reply #5 on: September 26, 2009, 05:23:52 pm »
Just to update you, I think I see the problem, yet do not have a "good" fix for it yet.
quota's are set on the file system by user and/or group. Not the directory.

Soo, I'd normally say, put the share outside the /home directory. However, since the quota is on the entire file system of the partition. You seem to have a couple of options.

*********************
Have a user with no quota.
have a cron chmod the files in that directory to that user.
have your other users that access that directory have administrative privileges.
*********************
Or better yet, maybe force the user in samba to be a user with no, or a high quota
then have the other users have administrative privileges.
*********************

I am still researching to come up with the best option.

To recreate your issue, I created a share, then,
quota username
then changed the owner of a file in that share
then
quota username
and found the user now had less files in his quota

Remember, I don't know what I'm doing with quota. Just exploring the options..




dragonslayr

  • Zen Warrior
  • ***
  • Posts: 157
  • Karma: +1/-0
    • View Profile
Re: Change File Share Quota
« Reply #6 on: September 28, 2009, 04:16:59 pm »
Unless others have ideas, here's what I came up  with.

*******************
First, the best answer would be if ebox added an option to the file shares to "force user". And let you enter there a user with no qouta.
*******************
Second option - Which is the the one I'll be choosing for now.
Have a user with no quota.
have a cron chown the files in that directory to that user.
ex. chown forceuser /home/samba/shares/junk -R
*******************
Third option - (Thanks JA from Ebox staff)
Have a user with no quota
Edit the /usr/share/ebox/stubs/samba/smb.conf.mas
Insert the code for the share to force the user to that user with no quota
Find the "foreach my $share (@shares) {" section.

Enter the code.
% if ($share->{share} eq 'mysharename' ) {
 your_line = your_value
% }

Example below, see the bottom two lines of code.
Code: [Select]
% foreach my $share (@shares) {
[<% $share->{share} %>]
 comment = <% $share->{comment} %>
 path = <% $share->{path} %>
 valid users = <% $share->{validUsers} %>
 read list = <% $share->{readOnly} %>
 write list = <% $share->{readWrite} %>
 admin users = <% $share->{administrators} %>
 read only = No
 browseable = Yes
 force create mode = 0660
 force directory mode = 0660
% if ($antivirus xor defined($antivirus_exceptions{'share'}->{$share->{'share'}})) {
 vfs objects = full_audit vscan-clamav
 vscan-clamav: config-file = /etc/samba/vscan-clamav.conf
% }

% if ($share->{share} eq 'junk' ) {
 force user = forceuser
% }

%
% }












danueli

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Change File Share Quota
« Reply #7 on: December 18, 2009, 04:39:39 pm »
Hi,

That it's for a simple hidden folder.
And, how make this for 2 or 3 hidden folders in same directory?

Regards

ahavelind

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Change File Share Quota
« Reply #8 on: February 16, 2010, 08:30:01 pm »
I am also in need of changing the Disk Quota on Shared Directories (not user home folders).

Excuse me if I am wrong, but I don't think that is a viable solution.  I am a newbie as well and don't fully understand it though.  I don't want to make anyone an Admin that should not be though.

I've read a couple of posts and wanted to know if I understand it correct.  Does the size of Shared Directories come from the PDC default User folder size?  Assuming so, I will have to delete the present folders and change the default user directory size and then recreate all my folders.  Does that work?

Hopefully eBox will add a feature to change the folder size post creation much like the user home directory.  Seems like a major miss.  If this is not possible, I may not be able to keep using eBox as the company I am helping is in flux with lots of changes.  I need to be able to adjust these folders.

If this being fixed in future revs?