Programming :: PHP - Total Disk Quota For User

Nov 22, 2010

I am writing a php script and I need to find the total diskspace of a directory. I have used space already. I have a couple of different users with quotas
Code:
$path = "/home/" . ($_SERVER['PHP_AUTH_USER']);
$used = exec("du -c -a $path");
echo $used;
Will give me the disk space used. But I need total quota for that user.

View 4 Replies


ADVERTISEMENT

Red Hat / Fedora :: Assign Disk Space Quota To Particular User?

Dec 24, 2009

i am using linux redHat 5 and fedora9 How can assgin disk space quota to particular user suppose i have 4 users

user1
user2
user3
user4

All four users have a each folder

/data/folder1
/data/folder2
/data/folder3
/data/folder4

i want to assign space limit/restriction of 100MB on each on folder.

View 3 Replies View Related

Ubuntu Servers :: 9.10 - Setting Samba User Disk Quota

Apr 11, 2010

Is there a way to set a disk quota for samba users? I've found a few guides, but they were a little to complicated for my needs. Running Ubuntu server 9.10

View 3 Replies View Related

General :: Disk Quota Set On Partition

Mar 14, 2011

When going through my emails that are produced by the cron jobs ran on my Solaris servers, I am receiving a message that states,"/ is 50% full" what can I do to either lower the amount of data on this partition or raise the threshold limits to to stop this message? I would prefer to learn how to lower the amount of data on this disk to bring under my disk quota of 50% in order to stop these emails being produced by the cron job running on this server.

View 1 Replies View Related

CentOS 5 :: Disk Quota On NFS Mount?

Apr 24, 2010

I am wondering if I can set diskquota on a nfs mount, instead of where the folder actually located.

e.g.
HOST1 - /dev/sdb1 /home
exports /home to HOST2
HOST2 - HOST1:/home /home
set quota from HOST2 for /home

Is this possible? I have not tried it, I wonder if anyone tried it.

View 1 Replies View Related

Server :: How To Create Disk Space Quota

May 26, 2010

What is the best way to create a hard (OS) quota on disk space folders? Basically in web root folder /var/www/lighttpd I have a folder called domains. I want to set a quota on each domain folder. The quota sizes will vary per folder. Is there a way to do this without creating a user for every domain? Currently every folder is owned by the lighttpd user and group.

View 2 Replies View Related

Server :: Disk Quota (Exceeded But Unable To Restrict)

Jun 17, 2010

I installed Diskquota on CentOS 5.1 machine. I enabled quota for some user with 1 GB as both hard and soft limits, Grace period is 0. Every this is working fine if we work from normal user's login say (user1 who is a system user). If he exceeds 1GB its will restrict that saying quota exceeded. But, If root user copies some 500MB files into his workspace, and change the ownership of those files using following command
chown user1.user1 * ( * is 500 MB files).

Then quota is exceeded and it is showed using:
repquota /home
user1 +- 2039960 997020 997020 none 298 0 0
Here its showing as some 2GB.
Soft limit is 951 MB.

So, my problem is restrict quota from all possible ways, i.e., even if root does some copying and change permissions, it must tell that disc quota exceeded.

View 2 Replies View Related

Server :: Setting Disk Quota For Bulk Users?

Jun 10, 2009

In our organization there are around 1000+ users are using mails. The mailing system is implemented under RHEL using postfix and dovecot. For user based quotas i have implemented Disk Quota. But the problem when i want to edit quota for multiple users with similar limits i'm doing "edquota user" for every users. It seems very difficult. Now I wanna know:

1. Is there any way to edit quota value for multiple users at a single shot?

2. Also there is any method to send alerts mail to the end users on disk utilization?

View 3 Replies View Related

General :: Determine How Much Quota Is Assigned To A User?

Nov 13, 2009

We have quota system in home directory and there is binary aquota.user file.

How do i determine how much quota is assigned to a user?

View 1 Replies View Related

General :: Set Unlimited Quota For System User?

Jan 1, 2009

What is the value to set unlimited quota for system user in linux?

View 1 Replies View Related

General :: User Quota On Sendmail Server?

May 25, 2011

I want to define user quota on Redhat linux5.2 sendmail server for all my users.

View 1 Replies View Related

Red Hat / Fedora :: Defining Quota For A User At Folder Level?

Jan 7, 2011

We are using Red Hat Enterprise AS 3.0. There are 100+ users connected to a single server. As the Inbox size of Mail Client (Thunderbird) for each user grows there are space constraint on the server. So I want to define a quota on mail folder for each user (say around 500 MB to 1 GB). How can I do this.

View 3 Replies View Related

General :: How To Check Quota Of A User In UNIX / Linux?

Aug 1, 2011

How to check quota of a user in UNIX/Linux?

View 2 Replies View Related

Debian :: Display User Quota In Human Readable Format

Mar 10, 2015

I want to display users quota in human readable format, so if the size is over 1 GB I want the quotas displayed in GBs

So when I issue the command below should I not get the results in GB ?

Code: Select allrepquota -sa

bob -- 87200M 400G 440G 879 0 0
dave -- 255G 400G 440G 3627 0 0
jim -- 10664M 400G 440G 230 0 0
tom -- 10737M 400G 440G 636 0 0

User bobs usage is 86GB, should 86GB not be displayed rather than 87200M?

View 1 Replies View Related

CentOS 5 Server :: Default Quota Setting When Create User?

Nov 1, 2010

Running a server using CentOS 5.5 (yum updated, x86_64), found that when using /usr/sbin/useradd to create system user, the quota for the user will default set to 5M soft and 10M hard (on /var/spool/mail partition). As remember the default setting for user quota should be both zero when create a new user.

man useradd and quota related command and no help, had any idea how to change/set the default quota when create user.

View 1 Replies View Related

Server :: Free Backup - Give A Disk Space Quota For Each Remote Windows Client

May 2, 2011

I'm looking for a free backup solution how work in client-server in both environments Linux(server) and Windows(client). in my case, i want to give a disk space quota in my Linux server for each remote windows client.

View 2 Replies View Related

General :: Single Disk Space Quota Across Home Directories And Relational Databases (MySQL, PostgreSQL)?

Jun 10, 2011

Relational databases usually have their data over in /var/lib/something. Users are in /home (with data in /var/www). How can I apply a single total disk space quota across all of these independent software systems (file systems, RDBMS, etc.)?

P.S. There's a bet going on around me as to just how awesome SU is. Let's see what you've got.

View 1 Replies View Related

Ubuntu :: Determine The Total Disk Space Used By All Emails In Thunderbird?

Aug 13, 2011

Is there a way to determine the total disk space used by all emails in thunderbird?

View 2 Replies View Related

General :: Calculate Total Memory Consumed By User?

Sep 20, 2010

is there a way to calculate the total memory consumed by user ?

View 12 Replies View Related

General :: Give Total Access To The System To A User Other Than Root?

Mar 9, 2011

How can you give total access to the system to a user other than root?

* Make the user a member of the root group.
* Change the UID of the user to 0.
* Add the user to the /etc/sudoers file.

I think none of these are correct answers.

View 14 Replies View Related

General :: Why Is Used + Available Disk Space Always Less Than Total Disk Space

Feb 24, 2011

root@localhost:~ $ df /dev/sdb1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 1922858352 23247088 1801935664 2% /mnt/external/sdb1

[code]....

View 1 Replies View Related

Programming :: How To Get The Total Arguments In Perl

Jan 6, 2010

How can I get the total arguments in perl.To be more specific if I try to execute the command

Code:
perl -w myperl.pl ash ok kumar

I should be able to get all the command line arguments.

I know that @ARGV will store only the arguments passed but not the entire arguments.

View 14 Replies View Related

Programming :: What Are The Series Of Files That Are Called When A User Make Copy Operation From Usb Mass Storage To Hard Disk

Mar 20, 2010

what are the series of files that are called when a user make copy operation from usb mass storage to hard disk?i have reached the code of the usb mass storage in linux kernel 2.6.33 and i want the exact code the make the copy how can i do that?

View 2 Replies View Related

Programming :: C - Adding Up Array Column Total?

Jan 25, 2010

I'm having problems adding up column totals using arrays. I've got it to add up the row totals and display at the end of the row. Here is my code so far

Code:

#include <stdio.h>
#include <string.h>
const int maxrows=10;

[code]...

What i need it to do is, add up the columns and display it at the bottom of each column similar to how the row totals display

View 2 Replies View Related

Programming :: Total Amount Of Allocated SHM Memory?

Aug 25, 2010

Is there an easy way in C to get the total amount of allocated SHM memory on a machine?

View 7 Replies View Related

Hardware :: Reduced Disk Space / Use The Total Amount Of Space?

Aug 25, 2009

OS: RHEL AS 5 64-bit

HDD:300 GB Hardware mirror (HP blade bl460c)

While installing OS, in partition window after OS file system structure I've left 277 GB. But after installation it shows Size - 255GB and available disk space is 242 GB.

Isn't it weired? How can I use the total amount of space in Linux? I need the whole 277GB exactly. What should be my workaround?

View 6 Replies View Related

Debian Programming :: How To Find Total Size Of A List Object In Byte

Jan 11, 2013

Assuming there are two list objects a1, a2.

a1 = ['
']
a2 =['hi
']

len() built-in function gives total number of elements in the list object.
len(a1) gives 1. len(a2) gives 1 also.

Code: Select all$ python
Python 2.7.3 (default, SepĀ  9 2012, 17:41:34)
[GCC 4.7.1] on linux2

[Code]......

I thought there exists a built-in function that gives total size of a list object in byte. So using the function produces 1 for a1, 3 for a2. I haven't found such function or module yet.

View 3 Replies View Related

Programming :: Write A Script To Calculate The Total Amount Of Installed Memory?

Apr 4, 2011

I am trying to write a script to calculate the total amount of installed memory to use during an anaconda kickscript, so the swap file is created at 2 x the installed memory. I so far have the amount of installed RAM DIMMS but need a way to total them up and produce a varible I can use in the pre section of the install.

Code:

dmidecode -t 17 | grep Size | awk ' { print $2 }'
Output:
2048
2048

Note: on some servers there could be from 1 DIMM up to 16 DIMMS installed so the script needs to be able to handle this. I also can not use bc as it does not exist during the install stage. I am guessing I need a while loop to do this and use expr but do not know where to start for this logic.

View 3 Replies View Related

Programming :: Write A Script That Can Show Me Total Memory Vs Used Memory?

Apr 13, 2010

How do I write a script for my Linux that can show me total memory vs used memory and have it email me results if it's over 70 percent?

View 2 Replies View Related

Programming :: Shell Programming - Delete User Input

Jan 21, 2011

I recently started shell programming and my task now is to do a menu display.Currently i am stuck whereby user will input both title and author and it will delete it.

Do i have to use sed command?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved