Skip to content

Commit 3b52909

Browse files
committed
Don't change ownership of PID_FOLDER
Update the launch script so that it no longer changes ownership of the PID_FOLDER. Commit b24e736 had changed the chown line from: chown "$run_user" "$PID_FOLDER/${identity}" to: chown "$run_user" "$PID_FOLDER" This meant that it was possible for the launch script to change ownership of `/var/run` and prevent later processes from writing to the folder. Since PID_FOLDER is created before the chown statement, and that the `checkPermissions` function runs to ensure that the PID file can be written, it appears that the chown is not even required. Fixes gh-6532
1 parent b97e0bd commit 3b52909

File tree

1 file changed

+0
-1
lines changed
  • spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools

1 file changed

+0
-1
lines changed

spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ do_start() {
143143
mkdir "$PID_FOLDER" &> /dev/null
144144
if [[ -n "$run_user" ]]; then
145145
checkPermissions || return $?
146-
chown "$run_user" "$PID_FOLDER"
147146
chown "$run_user" "$pid_file"
148147
chown "$run_user" "$log_file"
149148
if [ $USE_START_STOP_DAEMON = true ] && type start-stop-daemon > /dev/null 2>&1; then

0 commit comments

Comments
 (0)