Skip to content

Commit

Permalink
Merge pull request #331 from Automattic/fix-local-permissions
Browse files Browse the repository at this point in the history
fix(base): ownership/permissions of `~/.local/share`
  • Loading branch information
sjinks authored Aug 13, 2024
2 parents c603867 + 00861fe commit 4d48356
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion features/src/base/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "base",
"name": "VIP Codespaces Base",
"version": "1.2.3",
"version": "1.2.4",
"description": "Base feature for VIP Codespaces",
"documentationURL": "https://github.com/Automattic/vip-codespaces/tree/trunk/features/src/base",
"containerEnv": {
Expand Down
7 changes: 4 additions & 3 deletions features/src/base/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ fi

HOME_DIR="$(getent passwd "${_REMOTE_USER}" | cut -d: -f6)"

install -d -D -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" "${HOME_DIR}/.local"
install -d -D -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" "${HOME_DIR}/.local/share/vip-codespaces"
install -d -D -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" "${HOME_DIR}/.local/share/vip-codespaces/login"
install -d -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" "${HOME_DIR}/.local"
install -d -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" "${HOME_DIR}/.local/share"
install -d -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" "${HOME_DIR}/.local/share/vip-codespaces"
install -d -m 0755 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" "${HOME_DIR}/.local/share/vip-codespaces/login"

install -m 0644 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" .bashrc "${HOME_DIR}/.bashrc"
install -m 0644 -o "${_REMOTE_USER}" -g "${_REMOTE_USER}" 001-welcome.sh "${HOME_DIR}/.local/share/vip-codespaces/login/001-welcome.sh"
Expand Down

0 comments on commit 4d48356

Please sign in to comment.