Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: securing tmp directories
PostPosted: Thu May 23, 2013 12:10 pm 
Offline
Newbie

Joined: Wed May 22, 2013 9:53 am
Posts: 3
I am using centos 6.

Should i secure /var/tmp or /tmp directories ?
Any guide on this .

thank you


Top
   
PostPosted: Thu May 23, 2013 10:40 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
Those directories must be owned by root and group root and must be permission 1777 ("ls -ld /tmp" should show drwxrwxrwt). Anything else is a problem and will break things.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
PostPosted: Thu May 23, 2013 10:40 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
sweh wrote:
Those directories must be owned by root and group root and must be permission 1777 ("ls -ld /tmp" should show drwxrwxrwt). Anything else is a problem and will break things.

Code:
% ls -ld /tmp /var/tmp
drwxrwxrwt 4 root root 4096 May 23 22:28 /tmp
drwxrwxrwt 2 root root 4096 May 18 06:25 /var/tmp

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
PostPosted: Thu May 23, 2013 11:32 pm 
Offline
Newbie

Joined: Wed May 22, 2013 9:53 am
Posts: 3
thank's


Top
   
PostPosted: Tue Jun 25, 2013 7:17 pm 
Offline
Senior Newbie

Joined: Sat Sep 15, 2012 12:49 am
Posts: 14
Because /tmp is a world read+write+execute directory it can be advisable to have it on its own partition and to mount it as nonexec. This means should someone be able to get a malicious program into your /tmp directory they will have a harder time executing it.

Also by having /tmp on its own partition if something goes crazy, from malice or mistake, with writing to it your entire drive won't get filled.

Some information on this at http://www.debian-administration.org/articles/57

I know you are running CentOS but same things apply.


Top
   
PostPosted: Wed Jun 26, 2013 6:36 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Note noexec can break things such as compiling php modules using phpize etc..

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group