diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-11-04 19:04:38 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-11-04 19:04:38 +0100 |
commit | 868adfa4049fcb136d8b7aaaa347b9ffd918c7b9 (patch) | |
tree | dfec4319e77ce2c3a7d02155631dee14e1a2235e | |
parent | bef62b16c5e79bc81c8e37465477755690dc54cf (diff) | |
download | dbscripts-868adfa4049fcb136d8b7aaaa347b9ffd918c7b9.tar.gz dbscripts-868adfa4049fcb136d8b7aaaa347b9ffd918c7b9.tar.xz |
Grant the SVNUSER access to the working directory
-rw-r--r-- | db-functions | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/db-functions b/db-functions index b9d0d2f..b3a4293 100644 --- a/db-functions +++ b/db-functions @@ -17,6 +17,11 @@ restore_umask () { # set up general environment WORKDIR=$(mktemp -d "${TMPDIR}/${0##*/}.XXXXXXXXXX") +if [ -n "${SVNUSER}" ]; then + setfacl -m u:"${SVNUSER}":rwx "${WORKDIR}" + setfacl -m d:u:"${USER}":rwx "${WORKDIR}" + setfacl -m d:u:"${SVNUSER}":rwx "${WORKDIR}" +fi LOCKS=() # check if messages are to be printed using color @@ -509,6 +514,6 @@ arch_svn() { if [ -z "${SVNUSER}" ]; then /usr/bin/svn "${@}" else - sudo -u "${SVNUSER}" -- /usr/bin/svn "${@}" + sudo -u "${SVNUSER}" -- /usr/bin/svn --username "${USER}" "${@}" fi } |