Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions infra/base-images/base-builder/indexer/index_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from pathlib import Path # pylint: disable=g-importing-member
import shlex
import shutil
import stat
import subprocess
import tempfile
from typing import Any, Sequence
Expand Down Expand Up @@ -643,6 +644,18 @@ def main():
for snapshot in SNAPSHOT_DIR.iterdir():
shutil.move(str(snapshot), OUT)

# By default, this directory has o-rwx and its contents can't be deleted
# by a non-root user from outside the container. The rest of the files are
# unaffected because to delete a file, a write permission on its enclosing
# directory is sufficient regardless of the owner.
cdb_dir = OUT / 'cdb'
try:
cdb_dir.chmod(
cdb_dir.stat().st_mode | stat.S_IROTH | stat.S_IWOTH | stat.S_IXOTH
)
except OSError:
pass


if __name__ == '__main__':
main()
Loading