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}"