-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executable jar fails when started by root if log_file does not exist #12188
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged
label
Feb 23, 2018
philwebb
added
the
status: waiting-for-feedback
We need additional information before we can continue
label
Feb 23, 2018
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
spring-projects-issues
added
the
status: feedback-reminder
We've sent a reminder that we need additional information before we can continue
label
Mar 2, 2018
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
spring-projects-issues
removed
status: waiting-for-feedback
We need additional information before we can continue
status: feedback-reminder
We've sent a reminder that we need additional information before we can continue
status: waiting-for-triage
An issue we've not yet triaged
labels
Mar 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduced with: 2.0.0RC1
Steps to reproduce:
./app.jar start
)Result:
sh: <<logfile>>: Permission denied
Expected: application should start, process owner should be the owner of the executable jar file.
The cause seems to be that helper function
checkPermissions
does a touch on both$pid_file
and$log_file
. In the scenario above, this will cause both files to be created and owned by root.While this is ok for the pid file, it's not ok for the log file because in
do_start()
the application process is started withsu -s /bin/sh -c "$javaexe $(printf "\"%s\" " "${arguments[@]}") >> \"$log_file\" 2>&1 & echo \$!" "$run_user" > "$pid_file"
, which essentially starts a process as$run_user
with stdout redirected to$log_file
which is now owned by root.The issues seems to have been introduced by 886b392 which removed the line
chown "$run_user" "$log_file"
The text was updated successfully, but these errors were encountered: