[Rpm-maint] Bug: rpm should set a fixed umask of 0022 before running pre-/post scripts

Panu Matilainen pmatilai at redhat.com
Wed May 28 10:03:13 UTC 2008

On Tue, 20 May 2008, Joerg Mayer wrote:

> Hello,
> I'm running opensuse-factory and have opened a bug there but was redirected
> to the upstream rpm for a fix (https://bugzilla.novell.com/show_bug.cgi?id=390260).
> The problem: The postinstall scripts of some rpms create/replace files
> and while doing so assume a root umask of 0022. This will cause problems
> when root's umask is 0077.
> The bug shows in the postinstall scripts of some packages, as they creates new
> files and leave the new file at the default permissions, which in turn
> are modified by root's umask, which is 0077 on my system, resulting in files
> with permissions 600 instead of 644.
> The version of rpm is rpm-4.4.2-195.

Rpm and newer sets umask to 0022 on initialization, so it is 
already "fixed" upstream. Not that 0022 is a magic universally 
absolutely correct value for umask, it's just what most things (scriptlets 
notably) expect.

Would be trivial to make it configurable but rpm has way too many 
configuration options already...

 	- Panu -

More information about the Rpm-maint mailing list