-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use 775 default for mkdirs, to avoid world-write
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--TEST-- | ||
test permissions of created dirs | ||
--SKIPIF-- | ||
--FILE-- | ||
<?php | ||
require_once dirname(__FILE__) . '/setup.php.inc'; | ||
umask('000'); // force default to 777 to confirm we create tighter | ||
$tar = new Archive_Tar(dirname(__FILE__) . '/dir_permissions.tar'); | ||
$tar->extract('', true); | ||
$phpunit->assertNoErrors('after'); | ||
echo substr(sprintf('%o', fileperms('dir_permissions')), -4), PHP_EOL; | ||
echo 'tests done'; | ||
?> | ||
--CLEAN-- | ||
<?php | ||
unlink('dir_permissions/a.txt'); | ||
unlink('dir_permissions/b.txt'); | ||
rmdir('dir_permissions'); | ||
?> | ||
--EXPECT-- | ||
0775 | ||
tests done |
Binary file not shown.