Skip to content

Commit 9a4c64a

Browse files
sdmarshall79GitHub Enterprise
authored andcommitted
Fix symlink (#595)
* Fix permissions for symlink target for mqwebuser.xml * Suppress warnings for mqwebuser.xml symlink
1 parent 68c9f85 commit 9a4c64a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Dockerfile-server

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ RUN chmod ug+x /usr/local/bin/runmqserver \
135135
&& touch /run/termination-log \
136136
&& chown 1001:root /run/termination-log \
137137
&& chmod 0660 /run/termination-log \
138-
&& chmod -R g+w /etc/mqm/web
138+
&& chmod -R g+w /etc/mqm/web \
139+
&& chmod 0660 /etc/mqm/web/installations/Installation1/servers/mqweb/mqwebuser.xml
139140
# Always use port 1414 for MQ & 9157 for the metrics
140141
EXPOSE 1414 9157 9443
141142
ENV MQ_OVERRIDE_DATA_PATH=/mnt/mqm/data MQ_OVERRIDE_INSTALLATION_NAME=Installation1 MQ_USER_NAME="mqm" PATH="${PATH}:/opt/mqm/bin"

cmd/runmqserver/qmgr.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ func createDirStructure() error {
3838
out, rc, err := command.Run("/opt/mqm/bin/crtmqdir", "-f", "-a")
3939
if err != nil {
4040
if rc == 10 {
41-
log.Printf("Warning creating directory structure: %v\n", string(out))
41+
// Ignore warnings about 'mqwebuser.xml' being a symlink
42+
if !(strings.Join(strings.Fields(string(out)), " ") == "The filesystem object '/mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml' is a symbolic link.") {
43+
log.Printf("Warning creating directory structure: %v\n", string(out))
44+
}
4245
} else {
4346
log.Printf("Error creating directory structure: %v\n", string(out))
4447
return err

0 commit comments

Comments
 (0)