chmod the /tmp to what?

Whats the best chmod for a secure /tmp ?

777 seems to have security issues but if I try 755, 766, 764, or anything but 777 then I get errors on my sites.

What about 1777 or 2777...? These work but are they the most secure?

Anyone? I did a search on google and here and didnt come up with a definitive answer.

I am asking because I got exploited and part of it was a tgz file uploaded to the /tmp directory. Now if I can secure that directory that would of course be helpful.

Ideas anyone?

 

 

 

 

Top