
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 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.
-- 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 :
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:
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.
This could be an error if the log file wasn't properly initiated. But I am not sure that this isn't a bug.
-- thanks, Abhilash Raj (maxking)

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.
-- 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 :
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:
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.
This could be an error if the log file wasn't properly initiated. But I am not sure that this isn't a bug.
-- thanks, Abhilash Raj (maxking)
participants (4)
-
Aaryan Bhagat
-
Abhilash Raj
-
Arun H
-
Saswat Mishra