summaryrefslogtreecommitdiffstats
path: root/cron-jobs/adjust-permissions
blob: 307c3190959f4c4861f126d4dc432df7bea1a65d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

if [ -f /tmp/.ftpmaint.lck ]; then
	exit 0
fi

/bin/touch /tmp/.ftpmaint.lck

#adjust the nice level to run at a lower priority
/usr/bin/renice +10 -p $$ > /dev/null

cd /srv/ftp
/bin/chown -R ftp:ftp-arch core/os/i686
/bin/chown -R ftp:ftp-arch core/os/x86_64
/bin/chown -R ftp:ftp-extra {extra,testing}/os/i686
/bin/chown -R ftp:ftp-extra {extra,testing}/os/x86_64
/bin/chown -R ftp:aur community

for d in core extra testing community; do
    /bin/chmod -R g+w $d/os/i686
    /bin/chmod -R g+w $d/os/x86_64
done
/bin/chmod 555 /srv/ftp

rm -f /tmp/.ftpmaint.lck