set/get quota command

Stefan (metze) Metzmacher metze at metzemix.de
Fri May 9 06:06:07 GMT 2003


Hi Alexander,

here's the set/get quota command description...

I'll send you also a new quota patch later.
there are no functional changes
only a view 'inverted logic' fixes.




metze
-----------------------------------------------------------------------------
Stefan "metze" Metzmacher <metze at metzemix.de> 
-------------- next part --------------
get quota command

The get quota command setting should only be used on systems where no quota api is avalable or problem occurs with the internal disk quota functions.

This setting allows the replacement of the internal routines to get the disk quotas with an external routine.

The external program will be passed the following paramters:
directory path (\"%s\")	: indicating a directory in the filesystem being queried.
quota type (%d)		: indicating the type of the quotas.
			  user quotas (1)
			  user default quotas (2)
			  group quotas (3)
			  group default quotas (4)
quota id (%d)		: the user uid or group gid or (-1) for the default quotas

The script should return the following parameters in ASCII (in one line):
quota flags (%u)	: to say if quotas enabled.
			  quotas disabled (0)
			  quotas accounting enabled (1)
			  quotas accounting and enforcement enabled (2)
current blocks (%llu)	: the currently used blocks
softlimit blocks (%llu)	: the quota block softlimit
hardlimit blocks (%llu)	: the quota block hardlimit
current inodes (%llu)	: the currently used inodes
softlimit inodes (%llu)	: the quota inodes softlimit
hardlimit inodes (%llu)	: the quota inodes hardlimit
block size (%llu)	: (optional) the block size, the default is 1024 bytes

Note: On systems where %llu is not available %lu is used.

Note: Your script should NOT be setuid or setgid and should be owned by (and writeable only by) root!

Default: By default internal routines for determining the disk quotas will be used. 

Example: get quota command = /usr/local/samba/bin/get_quota



set quota command

The set quota command setting should only be used on systems where no quota api is avalable or problem occurs with the internal disk quota functions.

This setting allows the replacement of the internal routines to set the disk quotas with an external routine.

The external program will be passed the following paramters:
directory path (\"%s\")	: indicating a directory in the filesystem being queried.
quota type (%d)		: indicating the type of the quotas.
			  user quotas (1)
			  user default quotas (2)
			  group quotas (3)
			  group default quotas (4)
quota id (%d)		: the user uid or group gid or (-1) for the default quotas
quota flags (%u)	: to say if quotas enabled.
			  quotas disabled (0)
			  quotas accounting enabled (1)
			  quotas accounting and enforcement enabled (2)
softlimit blocks (%llu)	: the quota block softlimit
hardlimit blocks (%llu)	: the quota block hardlimit
softlimit inodes (%llu)	: the quota inodes softlimit
hardlimit inodes (%llu)	: the quota inodes hardlimit
block size (%llu)	: (optional) the block size, the default is 1024 bytes


The script should return one line of unspecified bytes in ASCII (in one line):
e.g. echo "Ok" ; exit(0);


Note: On systems where %llu is not available %lu is used.

Note: Your script should NOT be setuid or setgid and should be owned by (and writeable only by) root!

Default: By default internal routines for setting the disk quotas will be used. 

Example: set quota command = /usr/local/samba/bin/set_quota


More information about the samba-technical mailing list