Skip to content

Inconsistent directory permissions in bazel cache: user has no permissions to delete generated files #2053

@miklelappo

Description

@miklelappo

🐞 bug report

Affected Rule

I guess bootstrap python

ls -la ~/.cache/bazel/_bazel_mlappo/3c5c24edab0df70f75e12e6adf52c6d8/external/rules_python\~\~python\~python_3_11_x86_64-unknown-linux-gnu    
total 72
drwxr-xr-x   6 mlappo mlappo  4096 Jul  8 21:34 .
drwxr-xr-x 143 mlappo mlappo 36864 Jul 10 09:09 ..
drwxr-xr-x   2 mlappo mlappo  4096 Jul  8 21:34 bin
-rwxr-xr-x   1 mlappo mlappo  2752 Jul  8 21:34 BUILD.bazel
drwxr-xr-x   3 mlappo mlappo  4096 Jul  8 21:34 include
dr-xr-xr-x  10 mlappo mlappo  4096 Jul  8 21:34 lib
lrwxrwxrwx   1 mlappo mlappo   151 Jul  8 21:34 python -> /home/mlappo/.cache/bazel/_bazel_mlappo/3c5c24edab0df70f75e12e6adf52c6d8/external/rules_python~~python~python_3_11_x86_64-unknown-linux-gnu/bin/python3
-rw-r--r--   1 mlappo mlappo     0 Jul  8 21:34 REPO.bazel
drwxr-xr-x   3 mlappo mlappo  4096 Jul  8 21:34 share
-rwxr-xr-x   1 mlappo mlappo   100 Jul  8 21:34 STANDALONE_INTERPRETER
-rw-r--r--   1 mlappo mlappo     0 Jul  8 21:34 WORKSPACE

dr-xr-xr-x 10 mlappo mlappo 4096 Jul 8 21:34 lib

Is this a regression?

Don't know

Description

Specified directory and shared object are marked as read-only for current user (user performed the build)

🔬 Minimal Reproduction

bazel build //... with having i.e. wheel creation

🌍 Your Environment

Operating System:

  
uname -a
Linux mlappo-mobl 6.9.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 x86_64 GNU/Linux
  

Output of bazel version:

  
bazel version
Bazelisk version: v1.11.0
WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE.
Starting local Bazel server and connecting to it...
Build label: 7.2.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Jun 10 13:04:32 2024 (1718024672)
Build timestamp: 1718024672
Build timestamp as int: 1718024672
  

Rules_python version:

  
0.33.2
  

Anything else relevant?

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