LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-11-2003, 06:12 PM   #1
gsibble
Member
 
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162

Rep: Reputation: 30
User Quotas


I'm going to be soon running a linux server with samba so that windows clients can access certain files on it.

I'm going to set up their accounts so they cannot log in with SSL but can use SMB to browse some virtual shares and have a link to their home directory to backup some files on.

Now, how do I set it up so that each user has 100MB to use in the home directory and will not let them use more? I could do this in Windows Server 2003 with my eyes closed, but I don't know how in Linux. Thanks!
 
Old 08-11-2003, 06:28 PM   #2
jqcaducifer
Member
 
Registered: Jul 2003
Distribution: Fedora 3
Posts: 133

Rep: Reputation: 15
First you have to turn on filesystem quota support when configuring and recompiling the kernel (i don't know if it was already configured on my RH9 system as default; i think it was)

Then you need to use quotaon and quota and similar commands to set the limits for a user and/or group. I'm not too clear on spicifics, just do "man quotaon". Have fun.
 
Old 08-12-2003, 02:30 AM   #3
gsibble
Member
 
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162

Original Poster
Rep: Reputation: 30
Well, no manual entries for quota anywhere I assume that means it isn't part of the kernel.

Well, I wasn't planning on using Mandrake anyways so we'll wait and see if it's in the distro I'm gonna use.
 
Old 06-12-2007, 08:16 PM   #4
AshLinux
LQ Newbie
 
Registered: May 2007
Posts: 4

Rep: Reputation: 0
Quotas

1- mount one partition with quota feature
#mount -o usrquota ,grpquota <partition_name> <mount_point>
2- generate database file inside the partition
#quotacheck -cugv <quota_mount_point>
3- turn on quota
#quotaon <quota_mount_piont>
4- apply quota for users
#edquota -u <username>
5- apply quota for a primary group
#edquota -g <groupname>
 
Old 06-12-2007, 08:30 PM   #5
AshLinux
LQ Newbie
 
Registered: May 2007
Posts: 4

Rep: Reputation: 0
The edquota command creates and edits quotas. It creates a temporary file that contains each user's and group's current disk quotas. It determines the list of file systems with established quotas from the /etc/filesystems file. The edquota command also invokes the vi editor (or the editor specified by the EDITOR environment variable) on the temporary file so that quotas can be added and modified.

Note:
If you specify an editor in the EDITOR environment variable, you must specify the full pathname of the editor.
Quotas are maintained separately for each file system. When you create or edit a quota for a user or a group, the quota applies to a specific file system. A quota must be set in each file system where you want to use quotas.

By default, or when used with the -u flag, the edquota command edits the quotas of one or more users specified by the UserName parameter on the command line. When used with the -g flag, the edquota command edits the quotas of one or more groups specified by the GroupName parameter. The -p flag identifies a prototypical user (UserName) or a prototypical group (Proto-GroupName) and duplicates these quotas for a specified user or group.

A user can exceed established soft limits for a default grace period of 1 week. Upon expiration of the grace period, the soft limit is enforced as a hard limit. The grace period can be specified in days, hours, minutes, or seconds. A value of 0 indicates that the default grace period is imposed; a value of 1 second indicates that no grace period is granted. The -t flag changes the grace period.

Fields displayed in the temporary file are:

Blocks in use The current number of 1KB file system blocks used by this user or group.
Inodes in use The current number of files used by this user or group.
Block soft limit The number of 1KB blocks the user or group will be allowed to use during normal operations.
Block hard limit The total amount of 1KB blocks the user or group will be allowed to use, including temporary storage during a quota grace period.
Inode soft limit The number of files the user or group will be allowed to create during normal operations.
Inode hard limit The total number of files the user or group will be allowed to create, including temporary files created during a quota grace period.

Note:
A hard limit with a value of 1 indicates that no allocations are permitted. A soft limit with a value of 1, in conjunction with a hard limit with a value of 0, indicates that allocations are permitted only on a temporary basis.
When the editor is exited, the edquota command reads the temporary file and modifies the binary quota files to reflect any changes.

Hard or soft limits can only be specified in whole 1 KB block amounts.

Last edited by AshLinux; 06-12-2007 at 08:44 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copying user quotas from proto user jomy Linux - Enterprise 0 01-09-2005 02:06 AM
User Quotas humanrig Linux - Hardware 1 03-15-2004 07:24 AM
User Quotas Dipdngold Linux - General 2 01-21-2004 05:47 PM
issues with user quotas.. oeln Linux - General 1 10-15-2003 06:13 PM
User Quotas johnpayback Linux - General 5 08-12-2002 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration