Skip to content

Unable to assign permissions to subdirectories & files #621

@jasaz

Description

@jasaz

I am building a Tomcat 9 Alpine base image and the I'm not able to assign permissions to the subdirectories and files within /etc/tomcat9 and /usr/share/tomcat9 for nonroot user using the accounts & paths section below. However, when I assign a root permission by removing the accounts and paths section, it works.

contents:
     packages:
         - openjdk8-jre
         - tomcat9
accounts:
     groups:
         - groupname: nonroot
         - gid: 76543
      users:
         - username: non root
         - uid: 76543
       run-as: nonroot

paths:
       - path:  /etc/tomcat9
          type: permissions
          uid: 76543
          gid: 76543
          permissions: 0o775
          recursive: true
       - path:  /usr/share/tomcat9
          type: permissions
          uid: 76543
          gid: 76543
          permissions: 0o775
          recursive: true


environment:
     PATH:  /bin:/usr/lib/jvm/java-8-openjdk/bin:/usr/share/tomcat9/bin
     JAVA_HOME:  /usr/lib/jvm/java-8-openjdk
     CATALINA_HOME:  /usr/share/tomcat9

entrypoint:
    command: catalina.sh run

archs:
    - x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions