Skip to contentSkip to conversation

postfix: permission of /var/spool/mail seems incorrect

meta-networking In review Zhenbo Gao 2 participants 3 messages Jan 25, 2016 – Feb 27, 2016

lore
Share & tools
lore

Zhenbo Gao

author
#0 lore raw

Hi all,

I am confused with the permission on /var/spool/mail of the postfix recipe, why it is set to 2755?

See the following output:

root@qemu0:~# rpm -qlv postfix | grep /var/spool/mail
drwxr-sr-x 2 postfix nogroup 0 Sep 8 08:46 /var/spool/mail

The premission of /var/spool/mail ("r-s") seems strange as it belongs to nogroup, i think it is better to modify it to 0755 as to the normal case.

If so, the patch is offered.
If not, Can you give some advice?

Thanks,
Zhenbo

author
#1 lore raw

PATCH 1/1 postfix: permission of /var/spool/mail seems incorrect

See the following output:

root@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.
---
 meta-networking/recipes-daemons/postfix/postfix.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-daemons/postfix/postfix.inc +1 -1
index dc652d7..378310a 100644
@@ -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
     chown postfix:nogroup ${D}${localstatedir}/spool/mail
     install -m 0755 -d ${D}${localstatedir}/lib/postfix
     chown postfix:nogroup ${D}${localstatedir}/lib/postfix
Signature · 1 line
1.9.1
#2 lore raw
Quoted 16 lines · [[oe] [PATCH] postfix: permission of /var/spool/mail seems incorrect] On…

See the following output:

root@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.
---
 meta-networking/recipes-daemons/postfix/postfix.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-daemons/postfix/postfix.inc +0 -0
index dc652d7..378310a 100644

meta-networking/recipes-daemons/postfix/postfix.inc do_install () { · line 165

Quoted 5 lines
meta-networking/recipes-daemons/postfix/postfix.inc +1 -1
@@ -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.

Quoted 6 lines
meta-networking/recipes-daemons/postfix/postfix.inc +0 -0
     chown postfix:nogroup ${D}${localstatedir}/spool/mail
     install -m 0755 -d ${D}${localstatedir}/lib/postfix
     chown postfix:nogroup ${D}${localstatedir}/lib/postfix
Signature · 1 line
1.9.1
Signature · 2 lines
-Joe MacDonald.
:wq