From 8d23f53637790f7b96495d77a410a2cfc2795e07 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Thu, 13 Jan 2011 10:59:47 -0800 Subject: [PATCH] explaining why -type l is needed instead of -P, which is the default --- debian/debian/hudson.postinst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/debian/hudson.postinst b/debian/debian/hudson.postinst index 8b3c7fa829..781cc8a29c 100644 --- a/debian/debian/hudson.postinst +++ b/debian/debian/hudson.postinst @@ -37,6 +37,8 @@ case "$1" in find /var/lib/hudson -path "*jobs" -prune -o -type l -prune -o -exec chown hudson:adm {} + || true chown -R hudson:adm /var/run/hudson /var/log/hudson # change mode to 750 - exclude jobs and .ssh directories. See HUDSON-4047 + # we prune symlinks instead of -P to avoid chmod/chown getting symlinks as arguments + # (which ends up changing the target of the symlink, even though it's not recursive) find /var/lib/hudson -path "*jobs" -prune -o -path "*.ssh" -prune -o -type l -prune -o -exec chmod 750 {} + || true chmod -R 750 /var/run/hudson chmod 750 /var/log/hudson -- GitLab