FILE_DELETE on Mac OS ignores write permissions [message #70393] |
Thu, 08 April 2010 14:05 |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
I discovered a few days ago that in IDL 7.1.1, FILE_DELETE on OS X 10.6 ignores
file permissions and deletes files that have write permission turned off.
I create a file named test.txt and turn off write permission. �
As expected, I cannot delete it from the command line without
confirming that I want to override permissions.
stretch> touch test.txt
stretch> chmod u-w test.txt
stretch> ll test*
-r--r--r-- �1 bowman �bowman �0 Apr �8 15:45 test.txt
stretch> rm test.txt
override r--r--r-- �bowman/bowman for test.txt? n
stretch> ll test*
-r--r--r-- �1 bowman �bowman �0 Apr �8 15:45 test.txt
If I go to IDL and issue this command
IDL> file_delete, 'test.txt', /verbose
% FILE_DELETE: Removed file: test.txt.
The file is deleted despite the lack of write permission.
stretch> ll test*
ls: No match.
I have filed a bug report with ITTVIS.
Ken
|
|
|