summaryrefslogtreecommitdiff
path: root/cron-jobs/adjust-permissions
blob: 7f7e4c8e5b06b7f92c5d5cbb76a8a0c6c615a47e (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
#!/bin/sh

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

/bin/touch /tmp/.ftpmaint.lck

cd /home/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,unstable,testing}/os/i686
/bin/chown -R ftp:ftp-extra {extra,unstable,testing}/os/x86_64
/bin/chown -R ftp:aur community

/bin/chmod -R g+w /home/aur/unsupported{,-temp}

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

rm -f /tmp/.ftpmaint.lck