September 11 2017 | File::Path Security | Back Next |
Code adjustments are simple. If your current code is:
$cwd = cwd(); $first_level_subdir = "$cwd/alpha"; mkdir $first_level_subdir, 0755;
$second_level_subdir = "$first_level_subdir/beta"; mkdir $second_level_subdir, 0200;
# do something that needs a directory with 0200 permissions
rmtree('alpha'); (! -d $second_level_subdir) and say "$second_level_subdir removed"; (! -d $first_level_subdir) and say "$first_level_subdir removed";
Home Last TOC | Copyright © 2017 James E Keenan | Back Next |