[Twisted-web] default file creation when using reactor.spawnProcess
schenette at gmail.com
Mon Aug 29 13:15:21 EDT 2011
I've been coding all night, I should have known umask from chmod
but in order to accomplish the correct chmod I believe this is what I need:
results in chmod = 666 (rw-rw-rw-)
right? I realize this is now off topic, but just wanted to make sure
it was correct.
explicitly setting the umask I believe will fix the issue, testing now...
On Mon, Aug 29, 2011 at 10:03 AM, Glyph Lefkowitz
<glyph at twistedmatrix.com> wrote:
> On Aug 29, 2011, at 9:50 AM, Stephan wrote:
> what I'd like is for the twistd daemon to create files with a certain
> default file creation permission, so I'm looking at changing the
> but so far I can't get the format correctly, as I'm trying to use what
> I'd normally use for chmod
> when starting twistd what is the correct format for umask? is what I
> have correct?
> desired result is rw for owner, group and world.
> Not just in twistd, the terms "umask" and "chmod" are basically inverses.
> chmod sets the permissions of a file to a particular set of bits, but umask
> _masks out_ those bits on newly created files.
> The mask you want is "execute for everybody" (0b001001001) but you're
> currently specifying "everything but execute for everybody" (0b110110110).
> The Python interpreter can help you coerce this to octal, for use as a
> --umask command line option:
> Hope this helps,
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
More information about the Twisted-web