How to limit the use of /tmp and /var/tmp by arbitrary users

How to limit the use of /tmp and /var/tmp by arbitrary users

Post by Timothy J. L » Fri, 17 Apr 1998 04:00:00




|How can I limit or disable * users to write large file to /tmp or
|/var/tmp?

Disk quotas?

--
------------------------------------------------------------------------

Unsolicited bulk or commercial email is not welcome.             netcom.com
No warranty of any kind is provided with this message.

 
 
 

How to limit the use of /tmp and /var/tmp by arbitrary users

Post by Neil Ricke » Fri, 17 Apr 1998 04:00:00



Quote:>How can I limit or disable * users to write large file to /tmp or
>/var/tmp?

You can't, or not easily, unless you want to run quotas on '/tmp'

Quote:>My problem is I am having /tmp as the tmpfs of the swap space and
>/var in the / filesystem. I guess the only solution is to separate a small
>real
>filesystem /tmp and a standalone filesystem /var. Is there any other
>alternative?

I have a separate '/var', but '/tmp' is in swap.  Yesterday I had a
user with a humongous file in '/tmp'.  Worse still, he was editing
that file with an editor that reads the whole file into memory.  So
this user had a copy of the 12 meg file, another 12meg file as a save
copy with changes, and a process using 57Meg of memory.  The process
had been idle for 2 hours and 15 minutes.

I killed the process and deleted the files.  I have to consider other
users need for swap space.

 
 
 

How to limit the use of /tmp and /var/tmp by arbitrary users

Post by Steve Bellen » Fri, 17 Apr 1998 04:00:00




Quote:>Hello all,

>How can I limit or disable * users to write large file to /tmp or
>/var/tmp?

Well warn them, then disable their account.

Or if the need for temp space is real create a /scratch for them to use.

Quote:>My problem is I am having /tmp as the tmpfs of the swap space and
>/var in the / filesystem. I guess the only solution is to separate a small
>real
>filesystem /tmp and a standalone filesystem /var. Is there any other
>alternative?

>Thanks.

>Please remove .NOSPAM in my e-mail address when return by mail.

--

 
 
 

How to limit the use of /tmp and /var/tmp by arbitrary users

Post by Andrew Gabri » Fri, 17 Apr 1998 04:00:00




Quote:>Hello all,

>How can I limit or disable * users to write large file to /tmp or
>/var/tmp?
>My problem is I am having /tmp as the tmpfs of the swap space and

For this, limit the size of /tmp in your /etc/vfstab, e.g.

swap    -       /tmp    tmpfs   -       yes     size=30M

(I think this works from Solaris 2.5 onwards.)
This doesn't stop one user filling it, but it does stop it from
filling the swapspace.

Quote:>/var in the / filesystem. I guess the only solution is to separate a small
>real
>filesystem /tmp and a standalone filesystem /var. Is there any other
>alternative?

I have a separate /var/tmp.
For added performance, I run it with async metadata writes using fastfs...
ftp://ftp.wins.uva.nl/pub/solaris/fastfs.c.gz
although this would not be a good thing if it was shared with / or /var.

--
Andrew Gabriel
Consultant Software Engineer

 
 
 

How to limit the use of /tmp and /var/tmp by arbitrary users

Post by S S Wa » Sat, 18 Apr 1998 04:00:00


Hello all,

How can I limit or disable * users to write large file to /tmp or
/var/tmp?
My problem is I am having /tmp as the tmpfs of the swap space and
/var in the / filesystem. I guess the only solution is to separate a small
real
filesystem /tmp and a standalone filesystem /var. Is there any other
alternative?

Thanks.

Please remove .NOSPAM in my e-mail address when return by mail.

 
 
 

1. /tmp vs /usr/tmp vs /var/tmp



:Please help me understand temp directories.  I know what /tmp is for,
:and I know that /var/tmp is like /tmp only it is not normally cleared
:at boot-time.  But then what is /usr/tmp for?  or aren't /usr/tmp and
:/var/tmp usually used in the same implementation?

/usr/tmp and /var aren't normally in the same implementation.  

--

 InterNIC WHOIS: MJO | (has my PGP & Geek Code info) | Phone: +1 248-848-4481

2. Taking screenshot of login screen

3. Why is there /tmp in addition to /var/tmp.

4. Mount SMB shares with "mount" command? You CAN!

5. Permissions on /tmp or /var/tmp?

6. root vs. su

7. difference between /tmp and /var/tmp?

8. Trying to get Netscape 4.7.3

9. Permissions on /tmp or /var/tmp?

10. mfs & /tmp vs /var/tmp

11. /var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

12. dangers of linking /var/tmp -> /tmp

13. /tmp & /var/tmp sizes?