mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
9c3270b08c
Correct permission of /scratch to allow crosvmdev to modify its content after UID & GID changed to match host after container first start. TEST=tools/dev_container --stop ; tools/dev_container tools/run_tests --target=vm:aarch64 --build-only Change-Id: I8872c433ae903536750a4623f0d149b2875deba2 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3855471 Commit-Queue: Zihan Chen <zihanchen@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: Zihan Chen <zihanchen@google.com>
16 lines
571 B
Bash
16 lines
571 B
Bash
#!/usr/bin/env bash
|
|
# Copyright 2022 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
if [[ $OUTSIDE_GID != $(id -g crosvmdev) || $OUTSIDE_UID != $(id -u crosvmdev) ]]; then
|
|
groupmod -g "$OUTSIDE_GID" crosvmdev
|
|
usermod -u "$OUTSIDE_UID" crosvmdev
|
|
chown -R crosvmdev:crosvmdev /scratch
|
|
fi
|
|
|
|
# Transitional section to fix CI's cache permission
|
|
chmod -R 777 /cache
|
|
if [[ -d /workspace/infra/.recipe_deps ]]; then
|
|
chmod -R 777 /workspace/infra/.recipe_deps
|
|
fi
|