cf-mendix-buildpack icon indicating copy to clipboard operation
cf-mendix-buildpack copied to clipboard

PermissionError: [Errno 13] Permission denied: '/tmp/opt/mono-5.20.1.27/bin/mono'

Open franksoong opened this issue 2 years ago • 4 comments

HI Team, when i run latest version(branch) buildpack for you Mendix10 project, it throws below error, please he help:

PermissionError: [Errno 13] Permission denied: '/tmp/opt/mono-5.20.1.27/bin/mono'

the complete outputs:

[7pcqtf@shli6073 docker-mendix-buildpack]$ sudo docker build --build-arg BUILD_PATH=build .
[sudo] password for 7pcqtf:
Sending build context to Docker daemon  431.1MB
Step 1/28 : ARG ROOTFS_IMAGE=mendix-rootfs:app
Step 2/28 : ARG BUILDER_ROOTFS_IMAGE=mendix-rootfs:builder
Step 3/28 : FROM ${BUILDER_ROOTFS_IMAGE} AS builder
 ---> 88c692e31745
Step 4/28 : ARG BUILD_PATH=project
 ---> Running in b8e5375aa675
Removing intermediate container b8e5375aa675
 ---> 5332dd797470
Step 5/28 : ARG DD_API_KEY
 ---> Running in 1896c2b277fd
Removing intermediate container 1896c2b277fd
 ---> 066a3c8c173c
Step 6/28 : ARG EXCLUDE_LOGFILTER=true
 ---> Running in 14d687ac7c66
Removing intermediate container 14d687ac7c66
 ---> 966f761ac08b
Step 7/28 : ARG BLOBSTORE
 ---> Running in 480307dcb088
Removing intermediate container 480307dcb088
 ---> 8e122b8eaf42
Step 8/28 : ARG BUILDPACK_XTRACE
 ---> Running in 97004663c3d9
Removing intermediate container 97004663c3d9
 ---> 33091e620280
Step 9/28 : COPY $BUILD_PATH /opt/mendix/build
 ---> 98fbb4fc324b
Step 10/28 : ENV NGINX_CUSTOM_BIN_PATH=/usr/sbin/nginx
 ---> Running in ee2c3855cd10
Removing intermediate container ee2c3855cd10
 ---> 76cb48b88bcd
Step 11/28 : RUN mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&    chmod +rx /opt/mendix/buildpack/compilation.py /opt/mendix/buildpack/git /opt/mendix/buildpack/buildpack/stage.py &&    cd /opt/mendix/buildpack &&    ./compilation.py /opt/mendix/build /tmp/buildcache /tmp/cf-deps 0 &&    rm -fr /tmp/buildcache /tmp/javasdk /tmp/opt /tmp/downloads /opt/mendix/buildpack/compilation.py /opt/mendix/buildpack/git &&    ln -s /opt/mendix/.java /opt/mendix/build &&    chown -R ${USER_UID}:0 /opt/mendix /var/mendix &&    chmod -R g=u /opt/mendix /var/mendix
 ---> Running in 4bf77bf159ca
INFO: Mendix project compilation phase...
INFO: Preflight check on Mendix version [10.0.0.9976] and stack [cflinuxfs4]...
INFO: Mendix [10.0] is not maintained. Please use a medium- or long-term supported Mendix version to easily receive fixes (https://docs.mendix.com/releasenotes/studio-pro/lts-mts).
INFO: Preflight check completed
INFO: Building from source...
INFO: Selecting Mono Runtime: 5
Traceback (most recent call last):
  File "/opt/mendix/buildpack/./compilation.py", line 102, in <module>
    compilation_globals = call_buildpack_compilation()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/mendix/buildpack/./compilation.py", line 87, in call_buildpack_compilation
    return runpy.run_module("buildpack.stage", run_name="__main__")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen runpy>", line 229, in run_module
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/mendix/buildpack/buildpack/stage.py", line 178, in <module>
    mxbuild.build_from_source(
  File "/opt/mendix/buildpack/buildpack/core/mxbuild.py", line 67, in build_from_source
    subprocess.check_call(args, env=mono_env)
  File "/usr/lib64/python3.11/subprocess.py", line 408, in check_call
    retcode = call(*popenargs, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 389, in call
    with Popen(*popenargs, **kwargs) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/tmp/opt/mono-5.20.1.27/bin/mono'
The command '/bin/sh -c mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&    chmod +rx /opt/mendix/buildpack/compilation.py /opt/mendix/buildpack/git /opt/mendix/buildpack/buildpack/stage.py &&    cd /opt/mendix/buildpack &&    ./compilation.py /opt/mendix/build /tmp/buildcache /tmp/cf-deps 0 &&    rm -fr /tmp/buildcache /tmp/javasdk /tmp/opt /tmp/downloads /opt/mendix/buildpack/compilation.py /opt/mendix/buildpack/git &&    ln -s /opt/mendix/.java /opt/mendix/build &&    chown -R ${USER_UID}:0 /opt/mendix /var/mendix &&    chmod -R g=u /opt/mendix /var/mendix' returned a non-zero code: 1

i am using https://github.com/mendix/docker-mendix-buildpack/tree/latest for my Mendix 10 project build

franksoong avatar Oct 17 '23 13:10 franksoong