Skip to content

Commit

Permalink
Restore permissions after operations
Browse files Browse the repository at this point in the history
  • Loading branch information
ouuan committed Aug 4, 2020
1 parent 8f018ac commit 87e14f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ fi

pkgbuild_dir=$(readlink $pkgname -f) # nicely cleans up path, ie. ///dsq/dqsdsq/my-package//// -> /dsq/dqsdsq/my-package

getfacl -p -R "$pkgbuild_dir" /github/home > /tmp/arch-pkgbuild-builder-permissions.bak

# '/github/workspace' is mounted as a volume and has owner set to root
# set the owner of $pkgbuild_dir to the 'build' user, so it can access package files.
sudo chown -R build $pkgbuild_dir
Expand Down Expand Up @@ -67,3 +69,5 @@ case $target in
*)
echo "Target should be one of 'pkgbuild', 'srcinfo', 'run'" ;;
esac

sudo setfacl --restore=/tmp/arch-pkgbuild-builder-permissions.bak

0 comments on commit 87e14f1

Please sign in to comment.