Quota for root ?

Quota for root ?

am 07.03.2006 20:00:24 von Sion Khalaf

Hi,

Is it possible to create quota for root?
I have process that runs with root, which I want to limit its writing,
so it will not fill the whole File System.

Can it be done with quota ?

Thanks in advanced,
Sion

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Quota for root ?

am 07.03.2006 20:16:26 von David Fierbaugh

That seems like a bad idea, even if it is possible.

I'd suggest having it direct it's output to another process running as a
different user. Then you can use quota for that user. And if it did fill up
the device, you'd still have root's reserved % to keep the system at least
partially functional.

Or, create a file of a set size, and mount that as a drive, then record the
data to that file, then you have an exact limit on the amount of data
recorded.

I'm sure there are quite a few other creative solutions, those are just the
two that popped into my mind as quick fixes.

On Tuesday 07 March 2006 14:00, you wrote:
> Hi,
>
> Is it possible to create quota for root?
> I have process that runs with root, which I want to limit its writing,
> so it will not fill the whole File System.
>
> Can it be done with quota ?
>
> Thanks in advanced,
> Sion
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: Quota for root ?

am 08.03.2006 01:03:16 von Sion Khalaf

There is no possibility to do the first solution.
The second, regarding drive mounting, is it ram drive?
If so, How to mount it ?

Anyway, I am looking for a way to make my file system read only.
That will surely, be the best solution.

My application is writing into certain folder, not on the physically /
File system,
So I can make the / FS read only, Do you have an idea how can I do that
?

Lots of questions, but I am really appreciate your help !
Thank anyway..


-----Original Message-----
From: David Fierbaugh [mailto:david@fierbaugh.org]
Sent: Tuesday, March 07, 2006 9:16 PM
To: Sion Khalaf; linux-admin@vger.kernel.org
Subject: Re: Quota for root ?

That seems like a bad idea, even if it is possible.

I'd suggest having it direct it's output to another process running as a
different user. Then you can use quota for that user. And if it did fill
up the device, you'd still have root's reserved % to keep the system at
least partially functional.

Or, create a file of a set size, and mount that as a drive, then record
the data to that file, then you have an exact limit on the amount of
data recorded.

I'm sure there are quite a few other creative solutions, those are just
the two that popped into my mind as quick fixes.

On Tuesday 07 March 2006 14:00, you wrote:
> Hi,
>
> Is it possible to create quota for root?
> I have process that runs with root, which I want to limit its writing,

> so it will not fill the whole File System.
>
> Can it be done with quota ?
>
> Thanks in advanced,
> Sion
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin"

> in the body of a message to majordomo@vger.kernel.org More majordomo
> info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: Quota for root ?

am 08.03.2006 02:53:07 von Glynn Clements

Sion Khalaf wrote:

> There is no possibility to do the first solution.
> The second, regarding drive mounting, is it ram drive?

No, loopback filesystem.

> If so, How to mount it ?

mount -o loop

To create the file, first create a suitably-sized file with e.g.:

dd if=/dev/zero out=loopfile.dat bs=1m count=100 #100Mb

then create a filesystem on it with:

mke2fs -F loopfile.dat

> Anyway, I am looking for a way to make my file system read only.
> That will surely, be the best solution.
>
> My application is writing into certain folder, not on the physically /
> File system,
> So I can make the / FS read only, Do you have an idea how can I do that
> ?

Normally, directories which need to be writable, e.g. /var and /tmp,
would use separate partitions. Those partitions would be writable (but
probably using the noexec and nodev options), but the root filesystem
would be read-only.

The most common issue with making the root filesystem read-only is
that "mount" tries to write to /etc/mtab, which will fail. Either use
the -n option to mount or recompile mount to use e.g. /var/run/mtab
instead.

--
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

RE: Quota for root ?

am 08.03.2006 07:12:28 von Sion Khalaf

Thanks, I will try that first.

-----Original Message-----
From: Glynn Clements [mailto:glynn@gclements.plus.com]
Sent: Wednesday, March 08, 2006 3:53 AM
To: Sion Khalaf
Cc: linux-admin@vger.kernel.org
Subject: RE: Quota for root ?


Sion Khalaf wrote:

> There is no possibility to do the first solution.
> The second, regarding drive mounting, is it ram drive?

No, loopback filesystem.

> If so, How to mount it ?

mount -o loop

To create the file, first create a suitably-sized file with e.g.:

dd if=/dev/zero out=loopfile.dat bs=1m count=100 #100Mb

then create a filesystem on it with:

mke2fs -F loopfile.dat

> Anyway, I am looking for a way to make my file system read only.
> That will surely, be the best solution.
>
> My application is writing into certain folder, not on the physically /

> File system, So I can make the / FS read only, Do you have an idea how

> can I do that ?

Normally, directories which need to be writable, e.g. /var and /tmp,
would use separate partitions. Those partitions would be writable (but
probably using the noexec and nodev options), but the root filesystem
would be read-only.

The most common issue with making the root filesystem read-only is that
"mount" tries to write to /etc/mtab, which will fail. Either use the -n
option to mount or recompile mount to use e.g. /var/run/mtab instead.

--
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Quota for root ?

am 08.03.2006 13:36:04 von hackmiester

Sion Khalaf wrote:

> Thanks, I will try that first.
man mount will fill you in
>
> -----Original Message-----
> From: Glynn Clements [mailto:glynn@gclements.plus.com]
> Sent: Wednesday, March 08, 2006 3:53 AM
> To: Sion Khalaf
> Cc: linux-admin@vger.kernel.org
> Subject: RE: Quota for root ?
>
>
> Sion Khalaf wrote:
>
>
>>There is no possibility to do the first solution.
>>The second, regarding drive mounting, is it ram drive?
>
>
> No, loopback filesystem.
>
>
>>If so, How to mount it ?
>
>
> mount -o loop
>
> To create the file, first create a suitably-sized file with e.g.:
>
> dd if=/dev/zero out=loopfile.dat bs=1m count=100 #100Mb
>
> then create a filesystem on it with:
>
> mke2fs -F loopfile.dat
>
>
>>Anyway, I am looking for a way to make my file system read only.
>>That will surely, be the best solution.
>>
>>My application is writing into certain folder, not on the physically /
>
>
>>File system, So I can make the / FS read only, Do you have an idea how
>
>
>>can I do that ?
>
>
> Normally, directories which need to be writable, e.g. /var and /tmp,
> would use separate partitions. Those partitions would be writable (but
> probably using the noexec and nodev options), but the root filesystem
> would be read-only.
>
> The most common issue with making the root filesystem read-only is that
> "mount" tries to write to /etc/mtab, which will fail. Either use the -n
> option to mount or recompile mount to use e.g. /var/run/mtab instead.
>
> --
> Glynn Clements
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>


--
--hackmiester
Walk a mile in my shoes and you will be a mile away in a new pair of shoes.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFD/yYl3ApzN91C7BcRAoVVAJ97uhjh30nQ4hd9bQ90gJqiwsLEfgCe KSrg
bVfqEeJ09WhO6Y51WHEHb6o=
=VTUd
-----END PGP SIGNATURE-----

-----BEGIN GEEK CODE BLOCK-----
Version: Geek Code v3.1 (PHP)
GCS/CM/E/IT d-@ s: a- C++$ UBLS*++++$ P+ L+++$ E- W++$ !N-- !o+ K-- !w-- !O-
M++$ V-- PS@ PE@ Y--? PGP++ !t--- 5--? !X-- !R-- tv-- b+ DI++ D++ G+ e++++
h---- r+++ z++++
------END GEEK CODE BLOCK------

Quick contact info:
Work: hfuller@stpaulsmobile.net
Personal: hackmiester@hackmiester.com
Large files/spam: hackmiester@gmail.com
GTalk:hackmiester/AIM:hackmiester1337/Y!:hackm1ester/IRC:irc .7sinz.net/7sinz
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html