Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling setfacl with option -L to follow symbolic links created for ... #956

Merged
merged 1 commit into from
Jan 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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