openmamba-fix-permissions: move cron file from daily to hourly and add new external script
This commit is contained in:
parent
ca0db5289e
commit
1a33b8eef4
24
bin/openmamba-repository-fix-permissions
Executable file
24
bin/openmamba-repository-fix-permissions
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Fixes permissions on repositories
|
||||||
|
# Copyright (c) 2009-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
#
|
||||||
|
. /usr/share/makedist/functions.inc.sh
|
||||||
|
. /etc/sysconfig/openmamba-central
|
||||||
|
|
||||||
|
for rep in ${local_reps[*]}; do
|
||||||
|
getent passwd ftp$rep >/dev/null || {
|
||||||
|
echo "Warning: missing user ftp$rep for $rep repository; skipping."
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
find /var/ftp/pub/openmamba/$rep/SRPMS.base \
|
||||||
|
-user ftp$rep -a -group users -o -exec chown ftp$rep:users {} \;
|
||||||
|
for a in ${archs[*]}; do
|
||||||
|
[ -e /var/ftp/pub/openmamba/$rep/RPMS.$a ] && \
|
||||||
|
find /var/ftp/pub/openmamba/$rep/RPMS.$a \
|
||||||
|
-user ftp$rep -a -group users -o -exec chown ftp$rep:users {} \;
|
||||||
|
done
|
||||||
|
# >/dev/null
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user