Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Apr 2001 20:16:20 +0900
From:      "Lily Moore" <thuanan@iam.ne.jp>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: Limit size of a file in FreeBSD.
Message-ID:  <005201c0c278$d5f15180$0e05a8c0@iam.ne.jp>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_004E_01C0C2C4.45C830A0
Content-Type: text/plain;
	charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit

  I  have edited /etc/login.conf at "filesize" of the "default" record like
this:

   from  ":filesize=unlimited:\"     to  ":filesize=1M:\"

and tested OK. I couldn't upload files with size exceed 1M to my server.
  But I want to limit size of uploaded files to only WWW users, not to other
users in my system. So I restored "filesize" of  "default" record to
"unlimited". Then I created a new user with login class was "wwwuser", and
put "wwwuser" record into /etc/login.conf like this:

    wwwuser:\
        :copyright=/etc/COPYRIGHT:\
        :welcome=/etc/motd:\
        :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
        :path=~/bin /bin /usr/bin /usr/local/bin /usr/X11R6/bin:\
        :nologin=/var/run/nologin:\
        :cputime=unlimited:\
        :datasize=unlimited:\
        :stacksize=unlimited:\
        :memorylocked=unlimited:\
        :memoryuse=unlimited:\
        :filesize=1M:\
        :coredumpsize=unlimited:\
        :openfiles=unlimited:\
        :maxproc=unlimited:\
        :priority=0:\
        :ignoretime@:\
        :umask=022:


and then do

      cap_mkdb /etc/login.conf

  But when I tested again, the user of "wwwuser"login class can upload files
with size exceed 1M. Could I have any mistakes?
  Thank you in advanced.


----- Original Message -----
From: "Andrey Simonenko" <simon@comsys.ntu-kpi.kiev.ua>
To: "Lily Moore" <thuanan@iam.ne.jp>
Cc: <freebsd-questions@freebsd.org>
Sent: Wednesday, April 11, 2001 2:58 PM
Subject: Re: Limit size of a file in FreeBSD.


> Check login.conf(5) manual page. There is "filesize" parameter.
>

> ----- Original Message -----
> From: Lily Moore <thuanan@iam.ne.jp>
> Newsgroups: lucky.freebsd.questions
> Sent: 11 april 2001 C. 10:07
> Subject: Limit size of a file in FreeBSD.
>
>
> >  Does FreeBSD have any disk quota tools to limit the size of a file in
> file
> > system?


------=_NextPart_000_004E_01C0C2C4.45C830A0
Content-Type: text/html;
	charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-2022-jp">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff><FONT size=3D2>
<DIV>&nbsp; I &nbsp;have edited /etc/login.conf at "filesize" of the =
"default"=20
record like this:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;=20
from&nbsp;&nbsp;":filesize=3Dunlimited:\"&nbsp;&nbsp;&nbsp;&nbsp; =
to&nbsp;=20
":filesize=3D1M:\"</DIV>
<DIV>&nbsp;</DIV>
<DIV>and tested OK. I couldn't upload files with size exceed 1M to my =
server.=20
</DIV>
<DIV>&nbsp; But I want to limit size of uploaded files to only WWW =
users, not to=20
other users in my system. So&nbsp;I restored "filesize" =
of&nbsp;&nbsp;"default"=20
record to "unlimited". Then I created a&nbsp;new user with login class =
was=20
"wwwuser", and put&nbsp;"wwwuser" record into /etc/login.conf like =
this:</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; =
wwwuser:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:copyright=3D/etc/COPYRIGHT:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
:welcome=3D/etc/motd:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:setenv=3DMAIL=3D/var/mail/$,BLOCKSIZE=3DK,FTP_PASSIVE_MODE=3DYES:\<BR>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:path=3D~/bin /bin /usr/bin /usr/local/bin=20
/usr/X11R6/bin:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:nologin=3D/var/run/nologin:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
:cputime=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:datasize=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:stacksize=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:memorylocked=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
:memoryuse=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
:<FONT=20
color=3D#ff0000=20
size=3D3><STRONG>filesize=3D1M</STRONG></FONT>:\<BR>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;=20
:coredumpsize=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
:openfiles=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:maxproc=3Dunlimited:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:priority=3D0:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:ignoretime@:\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
:umask=3D022:</DIV>
<DIV>&nbsp;</DIV>
<DIV> </DIV>
<DIV>and then&nbsp;do </DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cap_mkdb /etc/login.conf =
</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; But&nbsp;when I tested again, the user of "wwwuser"login=20
class&nbsp;can upload files with size exceed 1M. Could I have any=20
mistakes?</DIV>
<DIV>&nbsp; Thank you in advanced.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>----- Original Message -----=20
<DIV>From: "Andrey Simonenko" &lt;<A=20
href=3D"mailto:simon@comsys.ntu-kpi.kiev.ua">simon@comsys.ntu-kpi.kiev.ua=
</A>&gt;</DIV>
<DIV>To: "Lily Moore" &lt;<A=20
href=3D"mailto:thuanan@iam.ne.jp">thuanan@iam.ne.jp</A>&gt;</DIV>
<DIV>Cc: &lt;<A=20
href=3D"mailto:freebsd-questions@freebsd.org">freebsd-questions@freebsd.o=
rg</A>&gt;</DIV>
<DIV>Sent: Wednesday, April 11, 2001 2:58 PM</DIV>
<DIV>Subject: Re: Limit size of a file in FreeBSD.</DIV></DIV>
<DIV><BR></DIV>
<DIV>&gt; Check login.conf(5) manual page. There is "filesize"=20
parameter.<BR>&gt; </DIV>
<DIV><BR>&gt; ----- Original Message -----<BR>&gt; From: Lily Moore =
&lt;<A=20
href=3D"mailto:thuanan@iam.ne.jp">thuanan@iam.ne.jp</A>&gt;<BR>&gt; =
Newsgroups:=20
lucky.freebsd.questions<BR>&gt; Sent: 11 april 2001 &Ccedil;. =
10:07<BR>&gt; Subject:=20
Limit size of a file in FreeBSD.<BR>&gt; <BR>&gt; <BR>&gt; &gt;&nbsp; =
Does=20
FreeBSD have any disk quota tools to limit the size of a file in<BR>&gt; =

file<BR>&gt; &gt; system?<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_004E_01C0C2C4.45C830A0--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005201c0c278$d5f15180$0e05a8c0>