[oe] [PATCH] postfix: permission of /var/spool/mail seems incorrect

Joe MacDonald Joe_MacDonald at mentor.com
Sat Feb 27 01:48:47 UTC 2016


[[oe] [PATCH] postfix: permission of /var/spool/mail seems incorrect] On 16.01.25 (Mon 16:54) Zhenbo Gao wrote:

> See the following output:
> root at qemu0:~# rpm -qlv postfix | grep /var/spool/mail
> drwxr-sr-x 2 postfix nogroup 0 Sep 8 08:46 /var/spool/mail
> The permission of /var/spool/mail "r-s" seems strange as it
> belongs to nogroup, modify it to 0755 as to the normal case.
> 
> Signed-off-by: Zhenbo Gao <zhenbo.gao at windriver.com>
> ---
>  meta-networking/recipes-daemons/postfix/postfix.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
> index dc652d7..378310a 100644
> --- a/meta-networking/recipes-daemons/postfix/postfix.inc
> +++ b/meta-networking/recipes-daemons/postfix/postfix.inc
> @@ -162,7 +162,7 @@ do_install () {
>      install -m 770 -d ${D}${localstatedir}/spool/postfix
>      chown postfix:postfix ${D}${localstatedir}/spool/postfix
>  
> -    install -m 2755 -d ${D}${localstatedir}/spool/mail
> +    install -m 0755 -d ${D}${localstatedir}/spool/mail

While this may stop errors from happening (and I'm not sure it will)
this doesn't seem like the right thing to do.  Consider, for example:

   http://wiki2.dovecot.org/MailLocation/mbox

You almost certainly want the sgid bit set on /var/*/mail.  If there's
an error here, my guess it that the mode should be 2775 not 2755.  If
you'd like to confirm that, cool, otherwise I'll have a look when I get
a chance.

Thanks,
-J.

>      chown postfix:nogroup ${D}${localstatedir}/spool/mail
>      install -m 0755 -d ${D}${localstatedir}/lib/postfix
>      chown postfix:nogroup ${D}${localstatedir}/lib/postfix
> -- 
> 1.9.1
> 
-- 
-Joe MacDonald.
:wq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20160226/5a02beaf/attachment-0002.sig>


More information about the Openembedded-devel mailing list