On Prickle-Prickle, Confusion 23, 3170 YOLD, Paweł Gołaszewski wrote:
>> Wiekszosc userow specjalnych ma "dzikie" wartosci ~/, co powoduje, ze >> proba tworzenia tam ~/tmp nie jest dobrym pomyslem. > > In-general - masz rację. > Jednak tam gdzie jest możliwość - taki tmp powinien być. W Owlu jest to rozwiązane (dla userów, którzy się logują) modułem pam_mktemp (http://www.openwall.com/pam/): #v+ leeloo!japhy:~$ echo $TMP $TMPDIR /tmp/.private/japhy /tmp/.private/japhy leeloo!japhy:~$ su - Password: leeloo!root:~# ls -ld /tmp/.private/ drwx--x--x 47 root root 4096 Jun 6 23:38 /tmp/.private/ leeloo!root:~# lsattr -d /tmp/.private/ ----a--------- /tmp/.private/ leeloo!root:~# ls -ld /tmp/.private/japhy drwx-----T 9 japhy friends 4096 Jun 11 04:02 /tmp/.private/japhy leeloo!root:~# lsattr -d /tmp/.private/japhy/ -------------- /tmp/.private/japhy/ leeloo!root:~# logout #v- Dla userów specjalnych można by to zautomatyzować w podobny sposób. Czyszczenie w /tmp robi pakiet stmpclean, który (względnie ostrożnie, żeby nie wyłożyć się na mkdir-bombie) złazi w podkatalogi: #v+ leeloo!japhy:~$ rpm -qi stmpclean Name : stmpclean Relocations: (not relocateable) Version : 0.3 Vendor: Openwall Release : owl2 Build Date: Tue Apr 13 22:50:14 2004 Install date: Mon Apr 19 05:07:44 2004 Build Host: i386-3.pvt.openwall.com Group : System Environment/Base Source RPM: stmpclean-0.3-owl2.src.rpm Size : 18341 License: BSD URL : http://www.internet2.edu/~shalunov/stmpclean/ Summary : A safe temporary directory cleaner. Description : The stmpclean utility removes old files (and old empty directories) from the specified directory. Its typical use is to clean directories such as /tmp where old files tend to accumulate. #v- -- __ Maciek Pasternacki <[EMAIL PROTECTED]> [ http://japhy.fnord.org/ ] `| _ |_\ / { ...najpierw się mała ranka zjawi mi na dłoni, jak zawsze ,|{-}|}| }\/ wszystko jest przeze mnie - potem blask na chwilę przetnie słońce \/ |____/ i jeszcze jaśniej będzie... } ( M.Świetlicki ) -><- _______________________________________________________ złota zasada - kto się nie zna, niech się nie wypowiada
