03-25-2010
10 More Discussions You Might Find Interesting
1. Cybersecurity
A few of the other employees here need to learn "vi" in order to use crontab to schedule / unschedule jobs on one of our production servers. I tried to set up a login on one of my Linux boxes for them to use "vimtutor", but scrapped it and decided to try for something more secure, since there are... (1 Reply)
Discussion started by: LivinFree
1 Replies
2. Shell Programming and Scripting
Hi,
I need to provide execute access to certain users and not to all users
For ex: if ther is a file /home/august/aug.sh.
and there are user's like jan,feb,mar,april,May and jan is the owner of that box. I need to provide execute access to feb and mar only. I also know the root pwd for... (3 Replies)
Discussion started by: Ashok_oct22
3 Replies
3. AIX
Hi,
We have Oracle Database on AIX 5.3 server.We want to give ftp access to a user to a specific folder.He should be able to put and get files from that specific folder only.Moreover he should not be able to cd to any other filesystems also along with root directory.
Please note that as per... (1 Reply)
Discussion started by: dwiravi
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am a newbie to Linux and I want to create a user which can only execute network config commands like ifconfig and ping(to check the config). The following is what I did but failed.
1) Created a group called 'netconfig'.
2) added a user named 'user'.
3) added user to the 'netconfig'... (4 Replies)
Discussion started by: ankushpandit
4 Replies
5. UNIX for Dummies Questions & Answers
Hi All ,
Some of the users should be restricted using the MV commands on some of the standard folders. We had an issue the other day like from the standard folder structure which was set up one of the user has moved a folder to a different location and the jobs failed as the folder was not... (6 Replies)
Discussion started by: perlamohan
6 Replies
6. Solaris
I have solaris 10 os 64 bit.
I need to create a restricted user which has the following command to run
ls
df and du
list crontab of root and edit crontab of root also
please help (2 Replies)
Discussion started by: reyazan
2 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies
8. AIX
Hello everyone
I need to create a restricted user or a special user. Here is what I need.
I have this path
next to profiles I have server1, server2, server3.......
The user that I have to create I need that he can move between server1. server2, server3 because in every one have logs... (1 Reply)
Discussion started by: lo-lp-kl
1 Replies
9. Debian
want to create a user account for each of the key programs installed on my debian server. For example, for the following programs:
Tomcat Nginx Supervisor PostgreSQL
This seems to be recommended based on my reading online. However, I want to restrict these user accounts as much as possible,... (3 Replies)
Discussion started by: Spadez
3 Replies
10. UNIX for Dummies Questions & Answers
Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies
QUOTA(2) System Calls Manual QUOTA(2)
NAME
quota - manipulate disk quotas
SYNOPSIS
#include <sys/quota.h>
quota(cmd, uid, arg, addr)
int cmd, uid, arg;
char *addr;
DESCRIPTION
The quota call manipulates disk quotas for file systems that have had quotas enabled with setquota(2). The cmd parameter indicates a com-
mand to be applied to the user ID uid. Arg is a command specific argument and addr is the address of an optional, command specific, data
structure that is copied in or out of the system. The interpretation of arg and addr is given with each command below.
Q_SETDLIM
Set disc quota limits and current usage for the user with ID uid. Arg is a major-minor device indicating a particular file system.
Addr is a pointer to a struct dqblk structure (defined in <sys/quota.h>). This call is restricted to the super-user.
Q_GETDLIM
Get disc quota limits and current usage for the user with ID uid. The remaining parameters are as for Q_SETDLIM.
Q_SETDUSE
Set disc usage limits for the user with ID uid. Arg is a major-minor device indicating a particular file system. Addr is a pointer
to a struct dqusage structure (defined in <sys/quota.h>). This call is restricted to the super-user.
Q_SYNC Update the on-disc copy of quota usages. Arg is a major-minor device indicating the file system to be sync'ed. If the arg parame-
ter is specified as NODEV, all file systems that have disc quotas will be sync'ed. The uid and addr parameters are ignored.
Q_SETUID
Change the calling process's quota limits to those of the user with ID uid. The arg and addr parameters are ignored. This call is
restricted to the super-user.
Q_SETWARN
Alter the disc usage warning limits for the user with ID uid. Arg is a major-minor device indicating a particular file system.
Addr is a pointer to a struct dqwarn structure (defined in <sys/quota.h>). This call is restricted to the super-user.
Q_DOWARN
Warn the user with user ID uid about excessive disc usage. This call causes the system to check its current disc usage information
and print a message on the terminal of the caller for each file system on which the user is over quota. If the user is under quota,
his warning count is reset to MAX_*_WARN (defined in <sys/quota.h>). If the arg parameter is specified as NODEV, all file systems
that have disc quotas will be checked. Otherwise, arg indicates a specific major-minor device to be checked. This call is
restricted to the super-user.
RETURN VALUE
A successful call returns 0, otherwise the value -1 is returned and the global variable errno indicates the reason for the failure.
ERRORS
A quota call will fail when one of the following occurs:
[EINVAL] The kernel has not been compiled with the QUOTA option.
[EINVAL] Cmd is invalid.
[ESRCH] No disc quota is found for the indicated user.
[EPERM] The call is priviledged and the caller was not the super-user.
[ENODEV] The arg parameter is being interpreted as a major-minor device and it indicates an unmounted file system.
[EFAULT] An invalid addr is supplied; the associated structure could not be copied in or out of the kernel.
[EUSERS] The quota table is full.
SEE ALSO
setquota(2), quotaon(8), quotacheck(8)
BUGS
There should be some way to integrate this call with the resource limit interface provided by setrlimit(2) and getrlimit(2).
The Australian spelling of disk is used throughout the quota facilities in honor of the implementors.
4.2 Berkeley Distribution May 15, 1986 QUOTA(2)