Skip to content

Commit

Permalink
Fix when USERNAME's group is not the same as USERNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Nov 13, 2024
1 parent 7ca2669 commit e96e695
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if ! command -v fixuid >/dev/null; then
if [ -z "${USERNAME:-}" ]; then
error "The USERNAME environment variable must be set."
fi
GROUPNAME="$(id -gn "${USERNAME}")"
fixuid_version='0.6.0'
echo "Installing fixuid v${fixuid_version}"
fixuid_url="https://github.com/boxboat/fixuid/releases/download/v${fixuid_version}/fixuid-${fixuid_version}-linux-$(dpkg --print-architecture).tar.gz"
Expand All @@ -60,7 +61,7 @@ if ! command -v fixuid >/dev/null; then
chown root:root "${fixuid_binary}"
chmod 4755 "${fixuid_binary}"
mkdir -p /etc/fixuid
printf "%s\n" "user: ${USERNAME}" "group: ${USERNAME}" >/etc/fixuid/config.yml
printf "%s\n" "user: ${USERNAME}" "group: ${GROUPNAME}" >/etc/fixuid/config.yml
fi

fixdockergid_binary='/usr/local/bin/fixdockergid'
Expand Down

0 comments on commit e96e695

Please sign in to comment.