Item9875: DirectedGraphPlugin leaves the umask set to the {RCS}{filePermissions} value

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: DirectedGraphPlugin
Branches:
Reported By: MichaelTempest
Waiting For:
Last Change By: MichaelTempest
If I publish a web to "file" (I used the rest interface, but I suspect the problem applies to command-line, too), then PublishPlugin can create directories that are not executable. This seems to be caused by another plugin changing the umask. Sure, that other plugin probably shouldn't be leaving the umask in that state, but PublishPlugin is easily broken by this.

I propose that PublishPlugin should change the umask to oct(777) - $Foswiki::cfg{RCS}{dirPermission} before creating directories, and similarly before creating files. Also, PublishPlugin should restore the umask when the file or directory creation is complete.

Thanks to GeorgeClark for the suggestion.

-- MichaelTempest - 24 Oct 2010

Hmmm. I should first confirm where the umask is coming from.

-- MichaelTempest - 25 Oct 2010

DirectedGraphPlugin is the culprit. It changes the umask for certain operations, but it doesn't restore the original umask when it is done. The problem goes away if I disable DirectedGraphPlugin

-- MichaelTempest - 30 Oct 2010
 
Topic revision: r8 - 01 Nov 2010, MichaelTempest
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy