Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Limiting /tmp While Allowing Massive File Transfers?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
thehailo
n00b
n00b


Joined: 11 Mar 2004
Posts: 47
Location: US

PostPosted: Tue Feb 14, 2006 12:49 am    Post subject: Limiting /tmp While Allowing Massive File Transfers? Reply with quote

I'm reformatting my SFTP server and would like to give /tmp its own partition, but I'm having trouble figuring out a good rule of thumb for setting its size. The server acts as my personal backup machine, so it's regularly moving massive files over (40 GB). Are files stored in /tmp during transfer? What's a good rule to apply if any (like how swap is normally 0.5-2.0x RAM)?

If there isn't a good way to handle this without wasting massive storage space on /tmp, is there a good way to limit /tmp otherwise like disk quotas? My goal is to be able to mount /tmp with noexec and pair it with disk quotas to strictly limit the ability of any one user to waste disk space.


Last edited by thehailo on Sat Feb 04, 2023 1:15 am; edited 2 times in total
Back to top
View user's profile Send private message
goma
n00b
n00b


Joined: 04 Feb 2006
Posts: 56

PostPosted: Tue Feb 14, 2006 11:57 am    Post subject: Reply with quote

Personally, on my computers I simply use tmpfs for /tmp and usually set it between 50M-100M, which is plenty.
Code:
goma@youshun:~ $ df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
none                   50M   12K   50M   1% /tmp

I've transferred large files back and forth via scp with no problem, so I'd say /tmp is not involved for those transfers. I'd be surprised if it's involved for transfers of any type except perhaps via web forms.

Incidentally, to use tmpfs for /tmp, don't allocate a partition for it and instead put something like the following in your /etc/fstab:
Code:
none                /tmp              tmpfs  size=50M                0 0

The other nice thing about having /tmp mounted in RAM with tmpfs is that it cleans itself when I shutdown my laptop. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum