From: Chris Koeritz Date: Tue, 20 Mar 2018 20:58:11 +0000 (-0400) Subject: added disabling of archive bit mapping X-Git-Tag: 2.140.110^2~5 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=0429ffb00a3f48ad1a6cb987d483609fe76c1a97 added disabling of archive bit mapping samba will try to stuff the archive bit from dos into the unix execute bit, in a poorly chosen default option for the archive mapping feature. this turns that feature off again. --- diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index fba7bb60..96daae90 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -243,12 +243,21 @@ sep pattern="[#;][[:blank:]]*read only = yes" replacement="read only = no" -# we just always do the replacement now, after realizing the sentinel pattern -# was actually already in the file... too much subtlety can get one into trouble. +# we just always do the replacement now rather than making it conditional, +# after realizing the sentinel pattern was actually already in the file... +# too much subtlety can get one into trouble. sed -i "0,/$pattern/{s/$pattern/$replacement/}" /etc/samba/smb.conf test_or_die "patching samba configuration to enable write acccess on user home dirs" echo successfully patched the samba configuration to enable writes on user home directories. +# add in a disabling of the archive bit mapping feature, which hoses up the execute bit +# in an attempt to save the sad old DOS archive bit across the samba connection. +grep -q "map archive" /etc/samba/smb.conf +# if the phrase wasn't found, we need to add it. +if [ $? -ne 0 ]; then + sed -i "/\[global\]/[global]\n\nmap archive = no" /etc/samba/smb.conf +fi + # sweet, looks like that worked... restart_samba