
I am facing an error while starting mailman core, it shows the following error:
$ mailman start Traceback (most recent call last): File "/usr/bin/mailman", line 11, in <module> load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')() File "/usr/lib/python3/dist-packages/mailman/bin/mailman.py", line 94, in main initialize(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 188, in initialize initialize_1(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 123, in initialize_1 mailman.config.config.load(config_path) File "/usr/lib/python3/dist-packages/mailman/config/config.py", line 106, in load with open(filename, 'r', encoding='utf-8') as user_config: PermissionError: [Errno 13] Permission denied: '/etc/mailman3/mailman.cfg'
Could anyone tell me how to I correct this error? Thanks.

On Thu, Mar 28, 2019, at 12:29 PM, Arun H wrote:
I am facing an error while starting mailman core, it shows the following error:
$ mailman start Traceback (most recent call last): File "/usr/bin/mailman", line 11, in <module> load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')() File "/usr/lib/python3/dist-packages/mailman/bin/mailman.py", line 94, in main initialize(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 188, in initialize initialize_1(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 123, in initialize_1 mailman.config.config.load(config_path) File "/usr/lib/python3/dist-packages/mailman/config/config.py", line 106, in load with open(filename, 'r', encoding='utf-8') as user_config: PermissionError: [Errno 13] Permission denied: '/etc/mailman3/mailman.cfg'
Could anyone tell me how to I correct this error? Thanks.
Where did you install it from?
You might need to run this as mailman
user instead of your user.
Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9
-- thanks, Abhilash Raj (maxking)

Hello Arun,
I think 'sudo' pre fix in the command should help.
Thanking You.
Saswat Mishra Sophomore B.Tech. I.I.T. Delhi
On Fri 29 Mar, 2019, 1:00 AM Arun H, <arunhari3210@gmail.com> wrote:
I am facing an error while starting mailman core, it shows the following error:
$ mailman start Traceback (most recent call last): File "/usr/bin/mailman", line 11, in <module> load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')() File "/usr/lib/python3/dist-packages/mailman/bin/mailman.py", line 94, in main initialize(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 188, in initialize initialize_1(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 123, in initialize_1 mailman.config.config.load(config_path) File "/usr/lib/python3/dist-packages/mailman/config/config.py", line 106, in load with open(filename, 'r', encoding='utf-8') as user_config: PermissionError: [Errno 13] Permission denied: '/etc/mailman3/mailman.cfg'
Could anyone tell me how to I correct this error? Thanks.
Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9

On Fri, Mar 29, 2019, at 1:59 AM, Saswat Mishra wrote:
Hello Arun,
I think 'sudo' pre fix in the command should help.
Please don't use sudo.
Figure out what is the permission that you need and use only those.
Sudo will get the mailman start
to work and change a lot of other
things that will break your installation.
Thanking You.
Saswat Mishra Sophomore B.Tech. I.I.T. Delhi
On Fri 29 Mar, 2019, 1:00 AM Arun H, <arunhari3210@gmail.com> wrote:
I am facing an error while starting mailman core, it shows the following error:
$ mailman start Traceback (most recent call last): File "/usr/bin/mailman", line 11, in <module> load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')() File "/usr/lib/python3/dist-packages/mailman/bin/mailman.py", line 94, in main initialize(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 188, in initialize initialize_1(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 123, in initialize_1 mailman.config.config.load(config_path) File "/usr/lib/python3/dist-packages/mailman/config/config.py", line 106, in load with open(filename, 'r', encoding='utf-8') as user_config: PermissionError: [Errno 13] Permission denied: '/etc/mailman3/mailman.cfg'
Could anyone tell me how to I correct this error? Thanks.
Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9
Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9
-- thanks, Abhilash Raj (maxking)

Please don't use sudo.
Figure out what is the permission that you need and use only those.
Sudo will get the mailman start
to work and change a lot of other
things that will break your installation.
Abhilash is right! do not do that and assume the software is okay. First of all, I guess you are contributing here as a developer. Then you should do the work in a separate environment as individual machines can cause specific issues which may not be issues at all of the software. Read the Contributing Guide for this.
Also for your current problem, I installed mailman from apt and looked at the files. The issue is with this line actually
with open(filename, 'r', encoding='utf-8') as user_config: PermissionError: [Errno 13] Permission denied: '/etc/mailman3/mailman.cfg'
doing ls -lah in /etc/mailman3 gave me this output
-rw-r----- 1 root list 11K Mar 29 22:50 mailman.cfg
I added +x bit to all (This is a temporary sol)
It worked but now gave me a new error
PermissionError: [Errno 13] Permission denied: '/var/lib/mailman3/locks/mailman-cfg.lck|aaryan-Inspiron-5577|11022|4859493668370032506'
Again doing ls -lah in /var/lib/mailman3/locks gave me this output
dr-xr-xr-x 2 list list 4.0K Mar 29 22:50 . drwxr-xr-x 11 list list 4.0K Mar 29 22:50 .. -rw-rw---- 2 list list 80 Mar 31 2019 master.lck -rw-rw---- 2 list list 80 Mar 31 2019 'master.lck|aaryan-Inspiron-5577|9998|1555612377512779593'
There is again a problem with owners and file permissions here. I can also fix this temporarily (Changed the group id)
Now there is this Attribute Error I do not understand why :
Traceback (most recent call last): File "/usr/bin/mailman", line 11, in <module> load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')() File "/usr/lib/python3/dist-packages/mailman/bin/mailman.py", line 94, in main initialize(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 189, in initialize initialize_2(propagate_logs=propagate_logs) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 152, in initialize_2 mailman.core.logging.initialize(propagate_logs) File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 157, in initialize _init_logger(propagate, sub_name, log, logger_config) File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 110, in _init_logger handler = ReopenableFileHandler(sub_name, path_abs) File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 50, in __init__ self._stream = self._open() File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 53, in _open return codecs.open(self.filename, 'a', 'utf-8') File "/usr/lib/python3.6/codecs.py", line 897, in open file = builtins.open(filename, mode, buffering) PermissionError: [Errno 13] Permission denied: '/var/log/mailman3/mailman.log' Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python3.6/logging/__init__.py", line 1945, in shutdown h.flush() File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 56, in flush if self._stream: AttributeError: 'ReopenableFileHandler' object has no attribute '_stream'
Judging by the scenario I think we need to fix the ownership and permissions first or am I missing something here?

On Fri, Mar 29, 2019, at 10:59 AM, Aaryan Bhagat wrote:
Please don't use sudo.
Figure out what is the permission that you need and use only those. Sudo will get the
mailman start
to work and change a lot of other things that will break your installation.Abhilash is right! do not do that and assume the software is okay. First of all, I guess you are contributing here as a developer. Then you should do the work in a separate environment as individual machines can cause specific issues which may not be issues at all of the software. Read the Contributing Guide for this.
Also for your current problem, I installed mailman from apt and looked at the files. The issue is with this line actually
with open(filename, 'r', encoding='utf-8') as user_config: PermissionError: [Errno 13] Permission denied: '/etc/mailman3/mailman.cfg'
doing ls -lah in /etc/mailman3 gave me this output
-rw-r----- 1 root list 11K Mar 29 22:50 mailman.cfg
I added +x bit to all (This is a temporary sol)
It worked but now gave me a new error
PermissionError: [Errno 13] Permission denied: '/var/lib/mailman3/locks/mailman-cfg.lck|aaryan-Inspiron-5577|11022|4859493668370032506'
Again doing ls -lah in /var/lib/mailman3/locks gave me this output
dr-xr-xr-x 2 list list 4.0K Mar 29 22:50 . drwxr-xr-x 11 list list 4.0K Mar 29 22:50 .. -rw-rw---- 2 list list 80 Mar 31 2019 master.lck -rw-rw---- 2 list list 80 Mar 31 2019 'master.lck|aaryan-Inspiron-5577|9998|1555612377512779593'
There is again a problem with owners and file permissions here. I can also fix this temporarily (Changed the group id)
The directory structure shouldn't be like this, the permissions are setup
for the mailman
user to execute mailman start
in Debian package,
AFAIK.
There should be a start script( systemd, init.d or whatever Debian is using these days) to start Mailman Server.
Now there is this Attribute Error I do not understand why :
Traceback (most recent call last): File "/usr/bin/mailman", line 11, in <module> load_entry_point('mailman==3.1.1', 'console_scripts', 'mailman')() File "/usr/lib/python3/dist-packages/mailman/bin/mailman.py", line 94, in main initialize(config_path) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 189, in initialize initialize_2(propagate_logs=propagate_logs) File "/usr/lib/python3/dist-packages/mailman/core/initialize.py", line 152, in initialize_2 mailman.core.logging.initialize(propagate_logs) File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 157, in initialize _init_logger(propagate, sub_name, log, logger_config) File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 110, in _init_logger handler = ReopenableFileHandler(sub_name, path_abs) File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 50, in __init__ self._stream = self._open() File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 53, in _open return codecs.open(self.filename, 'a', 'utf-8') File "/usr/lib/python3.6/codecs.py", line 897, in open file = builtins.open(filename, mode, buffering) PermissionError: [Errno 13] Permission denied: '/var/log/mailman3/mailman.log' Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python3.6/logging/__init__.py", line 1945, in shutdown h.flush() File "/usr/lib/python3/dist-packages/mailman/core/logging.py", line 56, in flush if self._stream: AttributeError: 'ReopenableFileHandler' object has no attribute '_stream'
This could be an error if the log file wasn't properly initiated. But I am not sure that this isn't a bug.
Judging by the scenario I think we need to fix the ownership and permissions first or am I missing something here?
Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9
-- thanks, Abhilash Raj (maxking)
participants (4)
-
Aaryan Bhagat
-
Abhilash Raj
-
Arun H
-
Saswat Mishra