objectclass
objectclass

Reputation: 224

JFrog Xray installation Docker install on CentOS - permission denied

Trying to install JFrog Xray on a CentOS machine, using the Docker installer. I've created a /opt/xray directory, where I've downloaded the install file into.

Then ran chmod +x xray on this file.

When I try to install using sudo "./xray install", I get the following output:

[root@xray xray]# sudo ./xray install
INFO: Using XRAY_MOUNT_ROOT=/root/.jfrog/xray
Verifying Xray prerequisites ...
WARNING: Running with 3GB Total RAM
WARNING: Running with 1 CPU Cores
The System resources are not aligned with Xray minimal prerequisites, Do you want to proceed with the process? [Y
touch: cannot touch '/data/installer.info': Permission denied
Are you adding this node to an existing cluster? (not relevant for the first cluster node) [Y/n]: n
mkdir: cannot create directory '/xray_global_mount_root/xray': Permission denied
./wrapper.sh: line 583: /xray_global_mount_root/xray/ha/ha-node.properties: No such file or directory
./wrapper.sh: line 586: /data/installer.info: Permission denied
./wrapper.sh: line 589: /data/installer.info: Permission denied
./wrapper.sh: line 592: /data/installer.info: Permission denied
ERROR: Installation failed

Any ideas what may be causing this?

Upvotes: 0

Views: 452

Answers (1)

Simon
Simon

Reputation: 11

I had a similar issue on RHEL and it was selinux getting in the way. To fix it, change the following line in the xray script: -

XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root"

To this: -

XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data:z -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root:z"

(basically adding :z to each volume).

This makes sure the folder is labelled to be used by multiple containers in selinux.

Upvotes: 1

Related Questions