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