From: Ara.T.Howard@... Date: 2005-05-13T03:15:28+09:00 Subject: Re: ruby-dev summary 26090-26127 On Fri, 13 May 2005, Tanaka Akira wrote: > In article , > Ara.T.Howard@noaa.gov writes: > >>> There are following two solutions. >>> >>> * Use chdir. >>> * Change a permission to 700 and change a owner. >> >> what about making a tmpdir of 0700, moving to that, then cleaning the dir >> under the tmp dir, and removing to tmpdir? i think just doing a chmod will >> fail on nfs since it caches inode information... > > They are different ideas. They are not expected to combine. maybe i was unclear - i meant: mkdir dir_to_be_removed.tmp chmod 0700 dir_to_be_removed.tmp mv dir_to_be_removed dir_to_be_removed.tmp # avoid race condition, ignore # errors here rm -rf dir_to_be_removed.tmp/dir_to_be_removed rm -rf dir_to_be_removed.tmp/ - no race, even on nfs - no security issue since all chmod'ing done during removal will happen under a restricted directory cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | renunciation is not getting rid of the things of this world, but accepting | that they pass away. --aitken roshi ===============================================================================