From a413aa848e49c77c6a056f871fbb3612d44e5a7e Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Mon, 15 Oct 2018 16:57:58 +0530 Subject: [PATCH] Remove chmod/chown -R usage in postinst --- debian/gitlab.postinst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/debian/gitlab.postinst b/debian/gitlab.postinst index bd564d5b3a..14af477ff3 100755 --- a/debian/gitlab.postinst +++ b/debian/gitlab.postinst @@ -107,15 +107,13 @@ case "$1" in done # 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 echo "Updating file permissions..." - chmod -R ug+rwX,o-rwx ${gitlab_repo_path}/ - chmod -R ug-s ${gitlab_repo_path}/ - find ${gitlab_repo_path}/ -type d -print0 | xargs -0 chmod g+s + chmod ug+rwX,o-rwx,u-s,g+s ${gitlab_repo_path}/ for i in ${gitlab_data_dir} ${gitlab_shell_root}; do - chown -R ${gitlab_user}: $i + chown ${gitlab_user}: $i done runuser -u ${gitlab_user} -- sh -c "chmod 700 ${gitlab_uploads_path}"