Re: Bad file permissions on .xmhcache

Wolfgang Denk <[email protected]> Sun, 08 Sep 2013 21:48:39 +0200
Newsgroups gmane.mail.exmh.user
Message-ID <[email protected]>
Dear Harv,

In message <[email protected]> you wrote:
>
> If you haven't already, I suggest that you check the Msg-Protect setting in
> the mh-profile.  You should find that the value is used in lib/scan.tcl where
> the .xmhcache is created.

Ah, no, I had not found this yet.  Thanks for pointing out.

OK - but the mh_profile man page says for both Msg-Protect and
Folder-Protect that these hold "An  octal  number  which  defines  the
permission bitsAn  octal  number  which  defines  the permission bits"
...

So maybe we should modify lib/scan.tcl like that?


--- lib/scan.tcl.ORIG	2008-06-19 10:46:51.000000000 +0200
+++ lib/scan.tcl	2013-09-08 21:48:07.373187853 +0200
@@ -338,7 +338,7 @@
 	if {$force || ! [Scan_CacheValid $f]} {
 	    puts $out "catch \{send $myname \{Exmh_Status \"scan +$f\"\}\}"
 	    puts $out "catch {
-		set out \[open $mhProfile(path)/$f/.xmhcache w $mhProfile(msg-protect)\]
+		set out \[open $mhProfile(path)/$f/.xmhcache w 0$mhProfile(msg-protect)\]
 		exec $mhProfile(scan-proc) +$f -width $ftoc(scanWidth) -noheader >@\$out
 		close \$out
 	    }"

What do you think?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
If in any problem you find yourself doing an immense amount of  work,
the answer can be obtained by simple inspection.