September 11 2017 | File::Path Security | Back Next |
Key diff:
+ if (not -l $root and -d _) { + # notabene: 0777 is for making readable in the first place, + # it's also intended to change it to writable in case we have + # to recurse in which case we are better than rm -rf for + # subtrees with strange permissions + chmod 0777, $root + or carp "Can't make directory $root read+writeable: $!" + unless $safe;
$root is top of a directory tree
If it's not a symlink and is a directory, change its permissions
Make it globally read-write-executable
Unless we have opted-in for "safety"
Dramatic change in rmtree()'s behavior away from rm -rf
To improve recursive removal for "subtrees with strange permissions."
Home Last TOC | Copyright © 2017 James E Keenan | Back Next |