Codebuild: privileged_mode modifies file system permissions

0

Hello, I have enabled privileged mode for my codebuild project where I am building a target using bazel and building a docker image. To start the docker daemon, I've followed this thread. However, I feel enabling privileged mode changes the file system permissions and makes it ready only because I am unable to create directories in bazel build logic. It is working without privileged mode enabled. Does anyone have suggestions to ensure the file system permissions don't change with privileged mode?

harsh
asked a month ago63 views
1 Answer
2

Hello,

There's not enough information to answer this question concisely.

  • Broadly speaking, enabling the privileged mode provides a higher level of access with regards to file system permissions. We can also see the difference from the CodeBuild build logs by running the corresponding commands.

  • For example, you can review the output of the findmnt -A command executed on a privileged and a non-privileged build. This command lists all the file systems accessible to the build container and the mode with which they're mounted, whether it is rw(read write) or ro(read only)

  • I tested this in my account and could clearly see the privileged mode granting more access to more of the file systems. I cannot put the output here due to length constraints. You should be able to see that the Privileged mode is giving more access to more of the filesystems.

  • I was also able to run these sample bazel builds successfully on both, privileged and non-privileged, builds. But these samples don't involve creating docker images so its not exactly and apples to apples comparison.

Therefore, to answer your question, we require more details that are non-public information and unavailable in the question. Please open a support case with AWS using the following link and provide more information such as :

  • Replication steps along with buildspec for a sample bazel build project
  • The error you're encountering(preferably captured in debug mode)
AWS
SUPPORT ENGINEER
answered a month ago
profile picture
EXPERT
reviewed a month ago
profile pictureAWS
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions