Do not assume the makechrootpkg user's groupname is the same as the username

chown support "$user:$group" but also "$user:" which infers $group
rather than leaving it as root. This looks up the group name in cases
where the default group is e.g. "users" and users do not get their own
unique groups.
This commit is contained in:
Eli Schwartz 2018-05-16 10:37:55 -04:00
parent 5b3c14454a
commit 7fcf847bc3
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ download_sources() {
local builddir
builddir="$(mktemp -d)"
chown "$makepkg_user:$makepkg_user" "$builddir"
chown "$makepkg_user:" "$builddir"
# Ensure sources are downloaded
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \