Files
runner-images/images/linux/post-generation/rust-permissions.sh
Leonid Lapshin ed38c86cbb Move linux provision scripts to virtual-environments (#1714)
* add linux-related scripts from MMS provisioner

* removed EOL

* removed Ubuntu condition

* moved PATH checking to cleanup section

* add clarification for cgroups names

* names alignment

* removed memory-configuration and agent specific scripts

* renamed folder to psot-generation, added template instructions

* moved key import to git installation

* moved PATH check to post-deployment instead of cleanup script

* add scripts

* output tests file

* add startup logic

* add powershell module for furute helpers

* removed unused modules

* copy to tmp folder because of permissions, copy to opt on post-generation step

* removed Pester test

* change post-generation location

* incorrect if statement

Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
2020-10-12 17:44:31 +03:00

12 lines
341 B
Bash

#!/bin/bash
# Fix permissions for the Rust folder
# https://github.com/actions/virtual-environments/issues/572
rust_folder="/usr/share/rust"
if [ -d "$rust_folder" ]; then
rust_folder_owner=$(ls -ld $rust_folder | awk '{print $3}')
if [ "$USER" != "$rust_folder_owner" ]; then
chown "$USER":docker -R $rust_folder
fi
fi