Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: changing owner while creating container for download support (#…
…2056) Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
- Loading branch information
Showing
17 changed files
with
213 additions
and
102 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
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,23 @@ | ||
#!/bin/bash | ||
set -e | ||
# Run this with USER root only | ||
for d in "$@"; do | ||
find "${d}" \ | ||
! \( \ | ||
-group "${SEL_GID}" \ | ||
-a -perm -g+rwX \ | ||
\) \ | ||
-exec chgrp -R "${SEL_GID}" -- {} \+ \ | ||
-exec chmod -R g+rwX -- {} \+ | ||
# setuid, setgid *on directories only* | ||
find "${d}" \ | ||
\( \ | ||
-type d \ | ||
-a ! -perm -6000 \ | ||
\) \ | ||
-exec chmod -R +6000 -- {} \+ | ||
# Relaxing permissions for OpenShift and other non-sudo environments | ||
chmod -R u+x "${d}" | ||
chgrp -R 0 "${d}" | ||
chmod -R g=u "${d}" | ||
done |
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
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
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
Oops, something went wrong.