[
https://issues.apache.org/jira/browse/AMQ-9690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949154#comment-17949154
]
Rod Allen commented on AMQ-9690:
--------------------------------
hi [~lincong] , As you say, if you follow the instructions and dont delete the
data directory then yes it works fine. Also, if you delete the data directory,
recreate it manually and ensure that its owned by your ActiveMQ user it also
works. This specific Jira was raised for the case where someone deletes the
data directory (e.g, due to some housekeeping activity) and in that case the
logic in the script does not work as intended, as it creates the data directory
owned as the root user. I admit its an edge case and probably low priority, but
I have provided details in comments as to a possible fix - just move the
location of section of script that was designed to re-create the directory - to
just after the LOAD CONFIGURATION section. In any case if you want to
replicate, just delete the data directory and then see how the init script
creates it root owned. Thanks for taking an interest in this :)
Regards
Rod
> activemq always creates the data directory as root when run as an init.d
> service
> --------------------------------------------------------------------------------
>
> Key: AMQ-9690
> URL: https://issues.apache.org/jira/browse/AMQ-9690
> Project: ActiveMQ Classic
> Issue Type: Bug
> Components: Distribution
> Affects Versions: 6.1.6, 5.18.7
> Reporter: Rod Allen
> Priority: Minor
>
> when following instructions from
> [https://activemq.apache.org/components/classic/documentation/unix-shell-script]
> to create an init.d or systemd script, the function in the main activemq
> will create the data directory as the root user even if user is specified in
> the env/setenv and copied to /etc/default/activemq. This can be seen on any
> RHEL 8 like Linux such as Rocky Linux 8. Follow the steps in the linked
> article, delete the $ACTIVEMQ_DATA directory and the service script will
> create the directory as root but cannot be written to as the non-root user so
> the service cannot be stopped. Workaround of course is to just manually
> create the data directory.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact