[PATCH] make install: prevent overwriting failure

Rusty Russell rusty at rustcorp.com.au
Mon Aug 3 20:12:40 MDT 2009

On second run of "make install":
	Installing setup templates
	cp: cannot create regular file `/usr/local/samba/share/setup/enableaccount': Permission denied
	make: *** [installmisc] Error 1

This is because the originals were made non-writable.  (I don't run make install
as root).

I think this was the intent, based on d6c44a704e9a138dba8398f45e9af2601826f659
"Add ad-schema/*.txt and utils to the installmisc.sh"

Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
Cc: Timur I. Bakeyev <timur at FreeBSD.org>

diff --git a/source4/script/installmisc.sh b/source4/script/installmisc.sh
index 0666ae1..257fae8 100755
--- a/source4/script/installmisc.sh
+++ b/source4/script/installmisc.sh
@@ -12,7 +12,7 @@ mkdir -p $SETUPDIR/ad-schema || exit 1
 cp setup/ad-schema/*.txt $SETUPDIR/ad-schema || exit 1
 for p in enableaccount newuser provision provision-backend setexpiry setpassword
-	chmod 0555 setup/$p
+	chmod a+x setup/$p
 	cp setup/$p $SETUPDIR || exit 1
 cp setup/schema-map-* $SETUPDIR || exit 1

More information about the samba-technical mailing list