September 11 2017 | File::Path Security | Back Next |
We can remove 6 of 8 directory trees: those with permissions 0100, 0300, 0400, 0500, 0600 and 0700.
ok 36 - rmtree (NON-traditional) removed 2 items: file; directory /tmp/11864_base/foo_11864_100 ok 37 - rmtree (NON-traditional) removed 2 items: file; directory /tmp/11864_base/foo_11864_300 ok 38 - rmtree (NON-traditional) removed 2 items: file; directory /tmp/11864_base/foo_11864_400 ok 39 - rmtree (NON-traditional) removed 2 items: file; directory /tmp/11864_base/foo_11864_500 ok 40 - rmtree (NON-traditional) removed 2 items: file; directory /tmp/11864_base/foo_11864_600 ok 41 - rmtree (NON-traditional) removed 2 items: file; directory /tmp/11864_base/foo_11864_700
But we can no longer remove 2 of 8 directory trees:
Those with permissions 0000 and 0200
I.e., those for which we lack both read and execute permissions.
ok 42 - Got expected warning re inability to chdir to child /tmp/11864_base/foo_11864_0000 ok 43 - rmtree (NON-traditional) failed: directory /tmp/11864_base/foo_11864_0000 ok 44 - Got expected warning re inability to chdir to child /tmp/11864_base/foo_11864_0200 ok 45 - rmtree (NON-traditional) failed: directory /tmp/11864_base/foo_11864_0200 1..45 ok All tests successful. Files=1, Tests=45, 0 wallclock secs ( 0.01 usr 0.02 sys + 0.04 cusr 0.00 csys = 0.07 CPU) Result: PASS
Home Last TOC | Copyright © 2017 James E Keenan | Back Next |