On 7/18/06, RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote:
I have a script that calls rmtree. The operation works; my directory and its contents are removed. However, I get this error: Can't make directory /u01/mydocs/mytest001 read+writeable: Operation not permitted at /u02/home/myacct_rem.pl line 41 If the directory has been deleted, why then is rmtree trying to make it read/writeable??!
The rmtree algorithm is prepared to deal with directories with erroneous permission bits. To be able to read the directory to learn its contents, and to write to the directory to delete them, the permissions need to include read+write. So rmtree's algorithm tries first to repair the permission bits of a directory, then to remove the directory contents, then finally to remove the directory itself. (It should be possible to fix rmtree to attempt the permission-bit repair only when needed, thus eliminating some spurious warnings. If you do this, please contribute your patch via perlbug.)
I'm not running as user "nobody", but I'm in group "nobody".
Then you shouldn't be able to change permission bits on user "nobody"'s files and directories; they're not yours. Perhaps you should ask user "nobody" to rmtree? Or if the files are supposed to be yours, maybe you just need to fix the ownership. Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>