Skip to content

Commit

Permalink
Merge pull request #956 from jzdunek/master
Browse files Browse the repository at this point in the history
Calling setfacl with option -L to follow symbolic links created for ...
  • Loading branch information
antonmedv authored Jan 16, 2017
2 parents 8e6351e + d786b61 commit 3955085
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions recipe/deploy/writable.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
run("$sudo chmod +a \"`whoami` allow delete,write,append,file_inherit,directory_inherit\" $dirs");
} elseif (commandExist('setfacl')) {
if (!empty($sudo)) {
run("$sudo setfacl -R -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dirs");
run("$sudo setfacl -dR -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dirs");
run("$sudo setfacl -RL -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dirs");
run("$sudo setfacl -dRL -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dirs");
} else {
// When running without sudo, exception may be thrown
// if executing setfacl on files created by http user (in directory that has been setfacl before).
Expand All @@ -70,8 +70,8 @@
$hasfacl = run("getfacl -p $dir | grep \"^user:$httpUser:.*w\" | wc -l")->toString();
// Set ACL for directory if it has not been set before
if (!$hasfacl) {
run("setfacl -R -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dir");
run("setfacl -dR -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dir");
run("setfacl -RL -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dir");
run("setfacl -dRL -m u:\"$httpUser\":rwX -m u:`whoami`:rwX $dir");
}
}
}
Expand Down

0 comments on commit 3955085

Please sign in to comment.