Remove chmod/chown -R usage in postinst
This commit is contained in:
parent
a100c25dc7
commit
a413aa848e
1 changed files with 3 additions and 5 deletions
8
debian/gitlab.postinst
vendored
8
debian/gitlab.postinst
vendored
|
@ -107,15 +107,13 @@ case "$1" in
|
||||||
done
|
done
|
||||||
|
|
||||||
# nginx/httpd should be able to connect to gitlab-workhorse.socket and serve public
|
# nginx/httpd should be able to connect to gitlab-workhorse.socket and serve public
|
||||||
chown ${gitlab_user}:${nginx_user} -R ${gitlab_uploads_path}/.. ${gitlab_pid_path}
|
chown ${gitlab_user}:${nginx_user} ${gitlab_uploads_path}/../* ${gitlab_pid_path}
|
||||||
|
|
||||||
# Customize permissions
|
# Customize permissions
|
||||||
echo "Updating file permissions..."
|
echo "Updating file permissions..."
|
||||||
chmod -R ug+rwX,o-rwx ${gitlab_repo_path}/
|
chmod ug+rwX,o-rwx,u-s,g+s ${gitlab_repo_path}/
|
||||||
chmod -R ug-s ${gitlab_repo_path}/
|
|
||||||
find ${gitlab_repo_path}/ -type d -print0 | xargs -0 chmod g+s
|
|
||||||
for i in ${gitlab_data_dir} ${gitlab_shell_root}; do
|
for i in ${gitlab_data_dir} ${gitlab_shell_root}; do
|
||||||
chown -R ${gitlab_user}: $i
|
chown ${gitlab_user}: $i
|
||||||
done
|
done
|
||||||
|
|
||||||
runuser -u ${gitlab_user} -- sh -c "chmod 700 ${gitlab_uploads_path}"
|
runuser -u ${gitlab_user} -- sh -c "chmod 700 ${gitlab_uploads_path}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue