Bug 1761455

Summary: Unable update sympa_aliases file
Product: [Fedora] Fedora EPEL Reporter: debugitu <RedHat-Bug>
Component: sympaAssignee: Xavier Bachelot <xavier>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: ikeda, xavier
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: sympa-6.2.48-2.el7 sympa-6.2.48-2.fc30 sympa-6.2.48-2.fc29 sympa-6.2.48-2.fc31 sympa-6.2.48-2.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-18 20:56:52 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 debugitu 2019-10-14 12:42:12 UTC
Description of problem:

When new mailing list is created via the web interface, the aliases file is not updated.

There is an error message in the syslog:

Oct 14 13:01:25 hoothoot wwsympa[7997]: err main::#1544 > main::do_create_list#9764 > Sympa::Spindle::spin#95 > Sympa::Request::Handler::create_list::_twist#223 > Sympa::Aliases::Template::add#106 Can't lock /var/lib/sympa/sympa_aliases


Version-Release number of selected component (if applicable):

sympa-6.2.44-3.el7.x86_64
sympa-httpd-6.2.44-3.el7.x86_64
sendmail-8.14.7-5.el7.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

The files /var/lib/sympa/sympa_aliases and /var/lib/sympa/sympa_aliases.db file are not modified

Expected results:

The file /var/lib/sympa/sympa_aliases to contain the aliases for the new mailing list, including the hash db version /var/lib/sympa/sympa_aliases.db

Additional info:

The directory /var/lib/sympa it not writable by the user sympa, as distributed in the rpm file. If I change the owner of that directory to be the user sympa, the aliases file is updated.


Is it possible to set the ownership of the directory /var/lib/sympa to be the user sympa at the time of installation of the rpm package?


drwxr-xr-x. 10 sympa sympa   193 Oct 14 13:51 /var/lib/sympa
-rw-r-----.  1 sympa sympa  3782 Oct 14 13:51 /var/lib/sympa/sympa_aliases
-rw-r-----.  1 root  smmsp 12288 Oct 14 13:51 /var/lib/sympa/sympa_aliases.db

Comment 1 Xavier Bachelot 2019-10-14 13:51:58 UTC
Hi debugitu,

Thanks for the bug report.

At first, the sympa_aliases and sympa_aliases.db files didn't look properly set to me.
sympa_aliases should be owned by user sympa and group sympa with perms 644.
sympa_aliases.db should be owned by user sympa and group root with perms 664.
Just curious, is that a fresh installation of sympa ?

Anyway, this is not the root cause of the issue. File locking has been modified by upstream.
The easiest workaround is probably to 'chown sympa:sympa /var/lib/sympa' as you already discovered.

I'll discuss this with upstream.

Regards,
Xavier

Comment 2 Xavier Bachelot 2019-10-14 13:53:24 UTC
Soji, this looks related to commit 391591c05 (and possibly bfa876ecb).

Comment 3 debugitu 2019-10-14 14:19:22 UTC
This is a fresh installation with following the instructions in the documentation:
https://sympa-community.github.io/manual/install/configure-mail-server-sendmail.html

Concerning the permission on the file /var/lib/sympa/sympa_aliases,
I just followed the instruction found at step number 4:

touch $SENDMAIL_ALIASES
chmod 640 $SENDMAIL_ALIASES
chown sympa:sympa $SENDMAIL_ALIASES

Concerning the ownership of /var/lib/sympa/sympa_aliases.db,
I set it by my own, according the most restrictive permission still functioning to avoid newaliases errors, based on:

ls -lL /usr/bin/newaliases 
-rwxr-sr-x. 1 root smmsp 836936 Aug  3  2017 /usr/bin/newaliases

Excellent support, many thanks!

Comment 4 debugitu 2019-10-14 14:34:54 UTC
Sorry, the .db file permission is matching the permission of the system's standard alias file:

ls -l /etc/aliases.db /var/lib/sympa/sympa_aliases.db
-rw-r-----. 1 root smmsp  12288 Oct 14 16:28 /etc/aliases.db
-rw-r-----. 1 root smmsp  12288 Oct 14 16:28 /var/lib/sympa/sympa_aliases.db

Comment 5 Xavier Bachelot 2019-10-14 16:42:49 UTC
I was referring to the owner/group/perms on the sympa_aliases{,.db} files as set by the rpm on initial install. It shouldn't be necessary to tweak them to get a working sympa install (except for the /var/lib/sympa perms issue related to the relocation of the lock file). However, changing from root to smmsp for the .db group might be something to look at.

Comment 6 Fedora Update System 2019-10-16 17:06:23 UTC
FEDORA-2019-c2bcb23920 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c2bcb23920

Comment 7 Fedora Update System 2019-10-16 17:06:26 UTC
FEDORA-EPEL-2019-6181673f24 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-6181673f24

Comment 8 Fedora Update System 2019-10-16 17:06:31 UTC
FEDORA-2019-1c0ea48133 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1c0ea48133

Comment 9 Fedora Update System 2019-10-17 15:30:10 UTC
sympa-6.2.48-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6ea5b1d015

Comment 10 Fedora Update System 2019-10-17 23:41:53 UTC
sympa-6.2.48-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1c0ea48133

Comment 11 Fedora Update System 2019-10-18 00:35:06 UTC
sympa-6.2.48-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c2bcb23920

Comment 12 IKEDA Soji 2019-10-18 01:48:48 UTC
(In reply to Xavier Bachelot from comment #2)
> Soji, this looks related to commit 391591c05 (and possibly bfa876ecb).

That's right.  `/var/lib/sympa/` should have write permission by `sympa` user.

Comment 13 Fedora Update System 2019-10-18 02:01:42 UTC
sympa-6.2.48-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-8886284be5

Comment 14 Fedora Update System 2019-10-18 02:27:47 UTC
sympa-6.2.48-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-6181673f24

Comment 15 Fedora Update System 2019-10-18 20:56:52 UTC
sympa-6.2.48-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2019-10-25 17:01:08 UTC
sympa-6.2.48-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2019-10-25 18:08:15 UTC
sympa-6.2.48-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2019-10-26 17:26:29 UTC
sympa-6.2.48-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2019-11-02 05:26:58 UTC
sympa-6.2.48-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.