summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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