Quota issue on user belongs to multiple Group


 
Thread Tools Search this Thread
Operating Systems Linux Quota issue on user belongs to multiple Group
# 1  
Old 06-27-2012
Quota issue on user belongs to multiple Group

I have setup a group quota for better disk usage.
What i am doing is to setup a quota with Samba share. I created user1,user2 and group project1 which belongs to /home/project1 dir. Quota is implemented on project1 group to write 100 MB on this share and This is working fine if a user1 and user2 which are belonging to project1 group under /home/project1. They can not write up to 100 MB on this share.

But the challenge is this when i am going to create another group project2 and created users user4 and user5 which belongs to this group and having home directory /home/project2 and samba share is created to access this.
This group is allocated 10 MB to write and user can't write up to 10 MB using samba share. Now the issue is when i assigned user4 to project1 as secondary group so they he can access/write on project1 share as well, he is accessing this share with only 10 MB limit where 100MB quota is assigned on this group.

My question is this, is there any way that a user which belongs to multi group [project1 and project2 and so on] he can write on these share as per the assigned quota on to these shares.
# 2  
Old 06-27-2012
It looks as if the quota was set at partition level instead of directory level so that if belonging to 2 groups, each assigned to a specific directory, it takes the more restrictive rule (or the last one that has been setup ?)

Maybe you could have a look at chapter 4 and 5 of this
# 3  
Old 06-27-2012
below are the steps what i did for this.

Scenario
=======

group name : project1
group members : user1, user2, user3.
group dump folder/common folder to the above mention users : /home/project1 (/dev/sda2).
group disk quota limit : 100MB soft and 110MB hard limit

GROUP QUOTA
===========

Step1 : Create a group
#groupadd project1

Step2 : Create all the require users with their home directory /home/project1 and group
as project1
#useradd -c "Testing group quota implementation" -m -d /home/project1 \
-g project1 user1
#useradd -c "Testing group quota implementation" -m -d /home/project1 \
-g project1 user2
#useradd -c "Testing group quota implementation" -m -d /home/project1 \
-g project1 user3

Step3 : Select/prepare the partition for quota, here my partition is /dev/sda2 so edit/etc/fstab file as shown below.
vim /etc/fstab
/dev/sda2 /home ext3 defaults,usrquota,grpquota 0 0

Step4 : Now remount the partition with rw permissions
#mount -o remount,rw /home

Step5 : Now create group quota database
#quotacheck -cug /home

Step6 : Once the above command executed successfully, check quota is implemented or not.
#repquota -a

Step 7 : #setquota -g project1 100000 110000 0 0 /dev/sda2
This will set quota for group project1

Step8 : #chmod 2770 -R /home/project1

Setup Samba Share
===============


Step 1 : provide the permissions on the above created folder.
#chmod -R 775 project1
#chown -R user1: project1 project1

Step2 : Now open /etc/samba/smb.conf file to create a share
vim /etc/samba/smb.conf
[global]
wide links = yes
unix extensions = no
[project1]
comment = Project1 share with Quota
path = /home/project1
browsable = yes
writable = yes
valid users = @project1
create mask = 775
directory mask = 775

same i used to create group project2 and assigned user4 and user5 to this group and assigned quota on /home/project2 and make it share from samba.

Please let me know if i am missing some configuration for this scenario here.
# 4  
Old 06-29-2012
Hello ctsgnb,

Thanks for the solution. I tried with Directory quota and this is working fine now.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding if my IP address belongs in a Class C group

I need help with a tcl code. I have a variable "myIP" which reads IP address from socket. How do I use regex to find out if it belongs to a group for e.g., 50.65.75.240/28 or 50.65.75.128/25 etc. (2 Replies)
Discussion started by: ampak
2 Replies

2. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies

3. Red Hat

Samba/Winbind issue - Can't get user and group info from sub domains

Hi, We now have a Samba or Winbind issue. The Linux client under RHEL6 can not get Windows' AD sub-domain info. See the following output please. The main domain 'Global' is shown online, but the sub-domain 'Europe' and 'Asia' are shown offline although they are online. Commands 'wbinfo -u' and... (0 Replies)
Discussion started by: aixlover
0 Replies

4. Red Hat

User and Group quota is not working on RHEL6.2 ext4/ext3

Hello! I am in a weird problem of not able to set quota on an ext4 file system. I have setup a logical volume on which this ext4 filesystem resides. It's going to be used by an application for dumping data. But we want to setup quota so that it does not consume all the free space of the lv. The... (5 Replies)
Discussion started by: admin_xor
5 Replies

5. UNIX for Advanced & Expert Users

ldapsearch to find netgroups which a user belongs to

how to use ldapsearch to find all the netgroups a user belongs to? It's Solaris. (1 Reply)
Discussion started by: jalite19
1 Replies

6. Red Hat

User quota

Hi, I want to apply the user quota, but i am unable to apply the quota to user. Kindly provide the guide line, so that i can sortout the problem. Step 1: Create partion on device #fdisk /dev/sda (because hard disk is scsi) #n (new partition table) i.e /dev/sda8. #p ( to print the partition... (2 Replies)
Discussion started by: sahu.tapan
2 Replies

7. AIX

/home belongs to a user?

While doing a "little" clean up job, i noticed something weird... A ls -altr of my / showed this: drwxr-xr-x 1549 johcham grands 102400 Jan 28 13:13 home How can a user become the owner / modify the group of my /home??? any thoughts? Can i chown this back to bin:bin (i think that... (2 Replies)
Discussion started by: Stephan
2 Replies

8. Shell Programming and Scripting

How to check if a user belongs to a group (KSH)?

Hi all, How can I check if a particular user id belongs to a group? (ie. how to check if the current user `whoami` is part of the a certain group? do i use the group name of group id?) Thanks in advance (2 Replies)
Discussion started by: rockysfr
2 Replies

9. UNIX for Advanced & Expert Users

Adding quota for a group

***deleted by reborg for rule 1 violation*** (1 Reply)
Discussion started by: manoranjan
1 Replies

10. Shell Programming and Scripting

Finding the group to which a user belongs

Is there any command to find to which group u ser belongs (3 Replies)
Discussion started by: radhika03
3 Replies
Login or Register to Ask a Question