summaryrefslogtreecommitdiffstats
path: root/cron-jobs/adjust-permissions
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-06-20 18:45:55 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-06-20 18:45:55 +0200
commitf6004585ef7ceff8e0119363f297104ac7900e09 (patch)
treec317d797e15c010f2c8741c77f225c91dbc90c7f /cron-jobs/adjust-permissions
parent0f705986ab0898a1cd23c3e6d25a118cbd804648 (diff)
downloaddbscripts-f6004585ef7ceff8e0119363f297104ac7900e09.tar.gz
dbscripts-f6004585ef7ceff8e0119363f297104ac7900e09.tar.xz
adjust permissions for package pool
Diffstat (limited to 'cron-jobs/adjust-permissions')
-rwxr-xr-xcron-jobs/adjust-permissions14
1 files changed, 12 insertions, 2 deletions
diff --git a/cron-jobs/adjust-permissions b/cron-jobs/adjust-permissions
index 0f87075..c92cb9e 100755
--- a/cron-jobs/adjust-permissions
+++ b/cron-jobs/adjust-permissions
@@ -21,19 +21,29 @@ get_dir_owner() {
echo "root:tusers" ;;
community-testing)
echo "root:tusers" ;;
+ packages/arch)
+ echo "ftp:ftp-extra" ;;
+ packages/community)
+ echo "root:tusers" ;;
esac
}
#adjust the nice level to run at a lower priority
/usr/bin/renice +10 -p $$ > /dev/null
-cd /srv/ftp
+cd $FTP_BASE
for d in $(get_repos_for_host); do
owner="$(get_dir_owner $d)"
/bin/chown -R $owner $d/os/{any,i686,x86_64}
/bin/chmod -R g+w $d/os/{any,i686,x86_64}
done
-/bin/chmod 555 /srv/ftp
+for p in $(get_pkgpool_for_host); do
+ owner="$(get_dir_owner $p)"
+ /bin/chown -R $owner $p/{any,i686,x86_64}
+ /bin/chmod -R g+w $p/{any,i686,x86_64}
+done
+
+/bin/chmod 555 $FTP_BASE
rm -f /tmp/.ftpmaint.lck