Sponsored Content
Operating Systems Linux Red Hat User and Group quota is not working on RHEL6.2 ext4/ext3 Post 302598833 by rhatdan on Wednesday 15th of February 2012 02:02:35 PM
Old 02-15-2012
The proper way to fix this would have been to add a label as you origininally tried.

# semanage fcontext -a -t var_t "/u02(/.*)?"
# restorecon -R -v /u02

This tells SELinux to label all content under /u02 as var_t and restorecon then resets the labels.

Since you are also going to use quota on this disk you could then execute the quota command without installing a custom policy.

But the real question is what kind of content is going to go in this directory, if it is going to be user directories, then this is the wrong label.


# semanage fcontext -a -e /home /v02
# restorecon -R -v /v02

Would then be the correct command.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can I check the user's mail quota?

how can I check mail quota, and then how can I send mail to user whose quota get full??? :confused: For this which script must I use? (8 Replies)
Discussion started by: emreatlier
8 Replies

2. Linux

How to set user quota

I've a redhat 9.0 and I want to set a user quota. but the question is where should I start from and How ??? :confused: :confused: :confused: :confused: (2 Replies)
Discussion started by: KaiXiang
2 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Enable user quota

hi! i would like to enable user quota on my system (FreeBSD 6.2) i've check on enabling user quota here but i still confuse with fstab it shows there: /dev/da1s2g /home ufs rw,userquota 1 2 but my current /etc/fstab : # Device Mountpoint FStype Options ... (1 Reply)
Discussion started by: rdns
1 Replies

5. 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

6. UNIX for Advanced & Expert Users

lvm user quota

Whats the best method of setting lvm user quota? I saw both of these and I am not sure which to use. Linux File System Quotas Howtos Linux-Vserver With LVM And Quotas - 5dollarwhitebox.org Media Wiki (1 Reply)
Discussion started by: cokedude
1 Replies

7. Red Hat

Convert ext4 to ext3

Is there any way to conver ext4 to ext3 filesystem without formatting the partition/disk .. Had ext3 filesystem and had converted it to ext4 by issuing following command # tune2fs -O extents,uninit_bg,dir_index /dev/sda1 # fsck -pf /dev/sda1 # blkid /dev/sda1 /dev/sda1:... (1 Reply)
Discussion started by: Shirishlnx
1 Replies

8. Linux

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... (3 Replies)
Discussion started by: sunnysthakur
3 Replies

9. Red Hat

Auto Increasing Quota for User.

Hi, I would like to know wheather we can increase the quota for particular user automatically? I am having requirement to increase the quota only for 2 days in a week. but that shoule be automatically instead of manualy modification. is it possible? (3 Replies)
Discussion started by: manoj.solaris
3 Replies

10. 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
semanage-fcontext(8)													      semanage-fcontext(8)

NAME
semanage fcontext- SELinux Policy Management file context tool SYNOPSIS
semanage fcontext [-h] [-n] [-N] [-s STORE] [ --add ( -t TYPE -f FTYPE -r RANGE -s SEUSER | -e EQUAL ) FILE_SPEC ) | --delete ( -t TYPE -f FTYPE | -e EQUAL ) FILE_SPEC ) | --deleteall | --extract | --list [-C] | --modify ( -t TYPE -f FTYPE -r RANGE -s SEUSER | -e EQUAL ) FILE_SPEC ) ] DESCRIPTION
semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. semanage fcontext is used to manage the default file system labeling on an SELinux system. This command maps file paths using regular expressions to SELinux labels. OPTIONS
-h, --help show this help message and exit -n, --noheading Do not print heading when listing the specified object type -N, --noreload Do not reload policy after commit -C, --locallist List local customizations -S STORE, --store STORE Select an alternate SELinux Policy Store to manage -a, --add Add a record of the specified object type -d, --delete Delete a record of the specified object type -m, --modify Modify a record of the specified object type -l, --list List records of the specified object type -E, --extract Extract customizable commands, for use within a transaction -D, --deleteall Remove all local customizations -e EQUAL, --equal EQUAL Substitute target path with sourcepath when generating default label. This is used with fcontext. Requires source and target path arguments. The context labeling for the target subtree is made equivalent to that defined for the source. -f [{a,f,d,c,b,s,l,p}], --ftype [{a,f,d,c,b,s,l,p}] File Type. This is used with fcontext. Requires a file type as shown in the mode field by ls, e.g. use 'd' to match only directories or 'f' to match only regular files. The following file type options can be passed: f (regular file),d (directory),c (character device), b (block device),s (socket),l (symbolic link),p (named pipe). If you do not specify a file type, the file type will default to "all files". -s SEUSER, --seuser SEUSER SELinux user name -t TYPE, --type TYPE SELinux Type for the object -r RANGE, --range RANGE MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login mapping defaults to the SELinux user record range. SELinux Range for SELinux user defaults to s0. EXAMPLE
remember to run restorecon after you set the file context Add file-context for everything under /web # semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?" # restorecon -R -v /web Substitute /home1 with /home when setting file context # semanage fcontext -a -e /home /home1 # restorecon -R -v /home1 For home directories under top level directory, for example /disk6/home, execute the following commands. # semanage fcontext -a -t home_root_t "/disk6" # semanage fcontext -a -e /home /disk6/home # restorecon -R -v /disk6 SEE ALSO
selinux (8), semanage (8) AUTHOR
This man page was written by Daniel Walsh <dwalsh@redhat.com> 20130617 semanage-fcontext(8)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy