Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1989821

Summary: /etc/mailman has wrong permissions 2755 instead of 2775, blocking "genaliases"
Product: Red Hat Enterprise Linux 8 Reporter: Peter Bieringer <pb>
Component: mailman-2.1-moduleAssignee: Martin Osvald 🛹 <mosvald>
Status: CLOSED MIGRATED QA Contact: František Hrdina <fhrdina>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.4CC: fhrdina, jorton
Target Milestone: betaKeywords: MigratedToJIRA, Regression, Reopened, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 20:25:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Bieringer 2021-08-04 06:22:53 UTC
This is related to 
https://bugzilla.redhat.com/show_bug.cgi?id=1229307
https://bugzilla.redhat.com/show_bug.cgi?id=1188043

Description of problem:
Can't generate new alias files as user "mailman", because /etc/mailman is not writable for that particular user


Version-Release number of selected component (if applicable):
mailman-2.1.29-11.module_el8.4.0+550+d42de55d.x86_64
mailman-2.1.34-3.fc34.x86_64.rpm (Fedora 34)

How reproducible:
Always


Steps to Reproduce:
1. su - -s /bin/bash mailman
2. /usr/lib/mailman/bin/genaliases

Actual results:
Traceback (most recent call last):
  File "/usr/lib/mailman/bin/genaliases", line 124, in <module>
    main()
  File "/usr/lib/mailman/bin/genaliases", line 112, in main
    MTA.create(mlist, nolock=True, quiet=quiet)
  File "/usr/lib/mailman/Mailman/MTA/Postfix.py", line 338, in create
    _do_create(mlist, VIRTFILE, _addvirtual)
  File "/usr/lib/mailman/Mailman/MTA/Postfix.py", line 325, in _do_create
    _check_for_virtual_loopaddr(mlist, textfile)
  File "/usr/lib/mailman/Mailman/MTA/Postfix.py", line 244, in _check_for_virtual_loopaddr
    outfp = open(filename + '.tmp', 'w')
IOError: [Errno 13] Permission denied: '/etc/mailman/virtual-mailman.tmp'


Expected results:
Working


Additional info:

EL8:
rpm -qlv mailman | grep -w /etc/mailman$
drwxr-sr-x    2 root    mailman                     0 Nov  3  2020 /etc/mailman

F34:
rpm -qlpv mailman-2.1.34-3.fc34.x86_64.rpm | grep -w /etc/mailman$ 
drwxr-sr-x    2 root     mailman                     0 Jan 27  2021 /etc/mailman


Workaround:
chmod g+w /etc/mailman

Comment 3 RHEL Program Management 2023-02-04 07:27:46 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 4 Martin Osvald 🛹 2023-04-02 13:49:36 UTC
Reopening this, this should have been fixed already by the below changes in versions 3:2.1.29-6 and 3:2.1.29-7, but it looks like a typo is behind 2755 instead of 2775 (the %changelog itself mentions that correctly):

3:2.1.29-6:
~~~
-Release: 5%{?dist}
+Release: 6%{?dist}
...
-# no need for setgid in configdir
-chmod %{buildroot}/%{configdir} -s -R
...
 %changelog
-* Thu Apr 23 2020 Pavel Zhukov <pzhukov> - 3:2.1.29-5
+* Thu Apr 23 2020 Pavel Zhukov <pzhukov> - 3:2.1.29-6
 - Update run directory references (#1805954)
+- fix #1188043 - set 2775 permission for /etc/mailman
~~~

3:2.1.29-7:
~~~
-Release: 6%{?dist}
+Release: 7%{?dist}
...
-%dir %attr(755,root,%{mmgroup}) %{configdir}
+%dir %attr(2755,root,%{mmgroup}) %{configdir}
...
+* Wed May  6 2020 Pavel Zhukov <pzhukov> - 3:2.1.29-7
+- Change attr of /etc/mailman
~~~

The +g right is needed as stated in RHEL7 bug 1188043 for /etc/mailman/aliases.tmp creation:

~~~
Actual results:
strace -e open shows:
open("/etc/mailman/aliases", O_RDONLY)  = 3
open("/etc/mailman/aliases.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied)
open("/var/lock/mailman/creator", O_RDONLY) = 3
~~~

Thanks for reporting this repeatedly.

Comment 9 RHEL Program Management 2023-09-21 20:12:21 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 10 RHEL Program Management 2023-09-21 20:25:09 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.