Whatever solution you decide on, please ensure it doesn't barf on Win32
afterwards.
Regards,
Dan
···
-----Original Message-----
From: Ara.T.Howard@noaa.gov [mailto:Ara.T.Howard@noaa.gov]
Sent: Thursday, May 12, 2005 12:15 PM
To: ruby-talk ML
Subject: Re: ruby-dev summary 26090-26127On Fri, 13 May 2005, Tanaka Akira wrote:
> In article <Pine.LNX.4.62.0505120944380.9643@harp.ngdc.noaa.gov>,
> 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 hererm -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 directorycheers.
-a