restoring a deleted list
![](https://secure.gravatar.com/avatar/91d4ad5d2d8c192b3d6d683f40eb80e8.jpg?s=120&d=mm&r=g)
I deleted a bunch of old lists on our server a while back; found any list that had no messages in the last two years and deleted via rmlist, but first I copied all the list files in /var/lib/mailman/lists to a different archive directory, just in case.
Now 3 months later I’ve gotten a question from someone about "where did this list go?”
How can I restore the list? Is it just a matter of creating a new list with the old name, then replacing the files in that directory with the archived ones? Or will just restprign the directory to /var/lib/mailman/lists suffice? It was not being archived so that is not an issue.
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 10/18/22 16:45, Bruce Johnson via Mailman-Users wrote:
How can I restore the list? Is it just a matter of creating a new list with the old name, then replacing the files in that directory with the archived ones? Or will just restprign the directory to /var/lib/mailman/lists suffice? It was not being archived so that is not an issue.
Do not create a list. All you need to do is restore /var/lib/mailman/lists/LISTNAME/config.pck.
config.pck.last will be recreated the first time the list is accessed. Any config.db* files are pre Mailman 2.1 and should have been removed if there were any. If digest.mbox is not empty it contains messages that weren't sent in a digest and are probably too old to be useful. Likewise pending.pck has info about things waiting user confirmation and request.pck is information about (un)subscription requests and held messages waiting moderator action. Anything there is also probably too old to be useful, but if you do restore request.pck and there are held messages, you also need to restore any /var/lib/mailman/data/heldmsg-LISTNAME* files.
In short, just ignore any old stuff and restore only /var/lib/mailman/lists/LISTNAME/config.pck.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/91d4ad5d2d8c192b3d6d683f40eb80e8.jpg?s=120&d=mm&r=g)
I can access the admin login page after doing that but trying to get into the list after entering the password I get Bug in Mailman version 2.1.29 We're sorry, we hit a bug! Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs or the web server logs. There’s no error in he web logs, but this is in the mailman error log Oct 19 14:45:13 2022 (495303) Failed config.pck write, retaining old state. [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU>.495303' Oct 19 14:45:13 2022 admin(495303): @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ admin(495303): [----- Mailman Version: 2.1.29 -----] admin(495303): [----- Traceback ------] admin(495303): Traceback (most recent call last): admin(495303): File "/usr/lib/mailman/scripts/driver", line 117, in run_main admin(495303): main() admin(495303): File "/usr/lib/mailman/Mailman/Cgi/admin.py", line 251, in main admin(495303): mlist.Save() admin(495303): File "/usr/lib/mailman/Mailman/MailList.py", line 613, in Save admin(495303): self.__save(dict) admin(495303): File "/usr/lib/mailman/Mailman/MailList.py", line 568, in __save admin(495303): fp = open(fname_tmp, 'w') admin(495303): IOError: [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU>.495303' admin(495303): [----- Python Information -----] admin(495303): sys.version = 2.7.18 (default, May 10 2022, 23:39:58) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)] admin(495303): sys.executable = /usr/bin/python2 admin(495303): sys.prefix = /usr admin(495303): sys.exec_prefix = /usr admin(495303): sys.path = ['/usr/lib/mailman/pythonlib', '/usr/lib/mailman', '/usr/lib/mailman/scripts', '/usr/lib/mailman', '/usr/lib/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/dist-packages'] admin(495303): sys.platform = linux2 admin(495303): [----- Environment Variables -----] admin(495303): CONTENT_LENGTH: 39 admin(495303): HTTPS: on admin(495303): HTTP_COOKIE: admin(495303): SERVER_NAME: lists.pharmacy.arizona.edu<http://lists.pharmacy.arizona.edu> admin(495303): SERVER_PROTOCOL: HTTP/1.1 admin(495303): PYTHONPATH: /usr/lib/mailman admin(495303): REMOTE_ADDR: 128.196.45.237 admin(495303): REQUEST_SCHEME: https admin(495303): SCRIPT_NAME: /mailman/admin admin(495303): REQUEST_METHOD: POST admin(495303): SERVER_PORT: 443 admin(495303): HTTP_HOST: lists.pharmacy.arizona.edu<http://lists.pharmacy.arizona.edu> admin(495303): PATH_INFO: /kappapsi_grad admin(495303): CONTENT_TYPE: application/x-www-form-urlencoded admin(495303): REMOTE_PORT: 51907 admin(495303): QUERY_STRING: admin(495303): REQUEST_URI: /mailman/admin/kappapsi_grad admin(495303): DOCUMENT_ROOT: /var/www/html But afaik the permissions are correct: ls -laR /var/lib/mailman/lists/kappapsi_grad/ /var/lib/mailman/lists/kappapsi_grad/: total 52 drwxr-sr-x 2 mailman mailman 24 Oct 19 14:33 . drwxrwsr-x 105 root mailman 8192 Oct 19 14:32 .. -rw-r----- 1 mailman mailman 36911 Oct 19 14:33 config.pck versus a working list: ls -laR /var/lib/mailman/lists/kappapsi/ /var/lib/mailman/lists/kappapsi/: total 104 drwxrwsr-x 2 mailman mailman 258 Oct 19 04:30 . drwxrwsr-x 105 root mailman 8192 Oct 19 14:32 .. -rw-rw-r-- 1 mailman mailman 1706 Jan 29 2001 admindbpreamble.html -rw-rw---- 1 mailman mailman 12557 Aug 12 2005 config.db -rw-rw---- 1 mailman mailman 12557 Aug 11 2005 config.db.last -rw-rw---- 1 mailman mailman 11653 Oct 19 04:30 config.pck -rw-rw---- 1 mailman mailman 11653 Oct 18 13:07 config.pck.last -rw-rw-r-- 1 mailman mailman 189 Jan 29 2001 handle_opts.html -rw-rw-r-- 1 mailman mailman 3136 Jan 29 2001 listinfo.html -rw-rw-r-- 1 mailman mailman 4106 Jan 29 2001 options.html -rw-rw---- 1 mailman mailman 391 Oct 12 20:58 pending.pck -rw-rw---- 1 mailman mailman 20 Oct 12 21:01 request.pck -rw-rw-r-- 1 mailman mailman 1169 Jan 29 2001 roster.html -rw-rw-r-- 1 mailman mailman 185 Jan 29 2001 subscribe.html Restarting the server did not work. On Oct 18, 2022, at 5:42 PM, Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> wrote: On 10/18/22 16:45, Bruce Johnson via Mailman-Users wrote: How can I restore the list? Is it just a matter of creating a new list with the old name, then replacing the files in that directory with the archived ones? Or will just restprign the directory to /var/lib/mailman/lists suffice? It was not being archived so that is not an issue. Do not create a list. All you need to do is restore /var/lib/mailman/lists/LISTNAME/config.pck. config.pck.last will be recreated the first time the list is accessed. Any config.db* files are pre Mailman 2.1 and should have been removed if there were any. If digest.mbox is not empty it contains messages that weren't sent in a digest and are probably too old to be useful. Likewise pending.pck has info about things waiting user confirmation and request.pck is information about (un)subscription requests and held messages waiting moderator action. Anything there is also probably too old to be useful, but if you do restore request.pck and there are held messages, you also need to restore any /var/lib/mailman/data/heldmsg-LISTNAME* files. In short, just ignore any old stuff and restore only /var/lib/mailman/lists/LISTNAME/config.pck. -- Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list -- mailman-users@python.org<mailto:mailman-users@python.org> To unsubscribe send an email to mailman-users-leave@python.org<mailto:mailman-users-leave@python.org> https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/ -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 10/19/22 14:58, Bruce Johnson via Mailman-Users wrote:
I can access the admin login page after doing that but trying to get into the list after entering the password I get
Bug in Mailman version 2.1.29
We're sorry, we hit a bug! ... There’s no error in he web logs, but this is in the mailman error log
Oct 19 14:45:13 2022 (495303) Failed config.pck write, retaining old state. [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU>.495303'
You have a permissions error. Permissions on /var/lib/mailman/lists/ and
/var/lib/mailman/lists/kappapsi_grad/ should be rwxrwsr-x
and
permissions on /var/lib/mailman/lists/kappapsi_grad/config.pck should be
`rw-rw----. The owner is not important, but the group must be the group
mailman runs as.
Mailman's bin/check_perms -f
run as root should fix this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/91d4ad5d2d8c192b3d6d683f40eb80e8.jpg?s=120&d=mm&r=g)
Thanks (as usual!) Mark!
On Oct 19, 2022, at 5:21 PM, Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> wrote:
On 10/19/22 14:58, Bruce Johnson via Mailman-Users wrote: I can access the admin login page after doing that but trying to get into the list after entering the password I get Bug in Mailman version 2.1.29 We're sorry, we hit a bug! ... There’s no error in he web logs, but this is in the mailman error log Oct 19 14:45:13 2022 (495303) Failed config.pck write, retaining old state. [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU><http://Pharmacy.Arizona.EDU>.495303'
You have a permissions error. Permissions on /var/lib/mailman/lists/ and /var/lib/mailman/lists/kappapsi_grad/ should be rwxrwsr-x
and permissions on /var/lib/mailman/lists/kappapsi_grad/config.pck should be `rw-rw----. The owner is not important, but the group must be the group mailman runs as.
Mailman's bin/check_perms -f
run as root should fix this.
-- Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list -- mailman-users@python.org<mailto:mailman-users@python.org> To unsubscribe send an email to mailman-users-leave@python.org<mailto:mailman-users-leave@python.org> https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs
![](https://secure.gravatar.com/avatar/91d4ad5d2d8c192b3d6d683f40eb80e8.jpg?s=120&d=mm&r=g)
Ugh, my elation at this fixing it was short lived. It’s back to the "Bug in Mailman" screen. still seeing the error :
admin(76376): IOError: [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU>.76376'
Permissions appear correct per you last message:
drwxr-sr-x 2 mailman mailman 47 Oct 21 04:30 kappapsi_grad
kappapsi_grad: total 80 -rw-rw---- 1 mailman mailman 36911 Oct 21 04:30 config.pck -rw-rw---- 1 mailman mailman 36911 Oct 20 04:30 config.pck.last
On Oct 19, 2022, at 5:21 PM, Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> wrote:
On 10/19/22 14:58, Bruce Johnson via Mailman-Users wrote: I can access the admin login page after doing that but trying to get into the list after entering the password I get Bug in Mailman version 2.1.29 We're sorry, we hit a bug! ... There’s no error in he web logs, but this is in the mailman error log Oct 19 14:45:13 2022 (495303) Failed config.pck write, retaining old state. [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU><http://Pharmacy.Arizona.EDU>.495303'
You have a permissions error. Permissions on /var/lib/mailman/lists/ and /var/lib/mailman/lists/kappapsi_grad/ should be rwxrwsr-x
and permissions on /var/lib/mailman/lists/kappapsi_grad/config.pck should be `rw-rw----. The owner is not important, but the group must be the group mailman runs as.
Mailman's bin/check_perms -f
run as root should fix this.
-- Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net>> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list -- mailman-users@python.org<mailto:mailman-users@python.org> To unsubscribe send an email to mailman-users-leave@python.org<mailto:mailman-users-leave@python.org> https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs
![](https://secure.gravatar.com/avatar/91d4ad5d2d8c192b3d6d683f40eb80e8.jpg?s=120&d=mm&r=g)
And I see the perms error on the directory now!
On Oct 21, 2022, at 4:50 PM, Bruce Johnson via Mailman-Users <mailman-users@python.org<mailto:mailman-users@python.org>> wrote:
Ugh, my elation at this fixing it was short lived. It’s back to the "Bug in Mailman" screen. still seeing the error :
admin(76376): IOError: [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU><http://Pharmacy.Arizona.EDU>.76376'
Permissions appear correct per you last message:
drwxr-sr-x 2 mailman mailman 47 Oct 21 04:30 kappapsi_grad
kappapsi_grad: total 80 -rw-rw---- 1 mailman mailman 36911 Oct 21 04:30 config.pck -rw-rw---- 1 mailman mailman 36911 Oct 20 04:30 config.pck.last
On Oct 19, 2022, at 5:21 PM, Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net><mailto:mark@msapiro.net>> wrote:
On 10/19/22 14:58, Bruce Johnson via Mailman-Users wrote: I can access the admin login page after doing that but trying to get into the list after entering the password I get Bug in Mailman version 2.1.29 We're sorry, we hit a bug! ... There’s no error in he web logs, but this is in the mailman error log Oct 19 14:45:13 2022 (495303) Failed config.pck write, retaining old state. [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU><http://Pharmacy.Arizona.EDU><http://Pharmacy.Arizona.EDU>.495303'
You have a permissions error. Permissions on /var/lib/mailman/lists/ and /var/lib/mailman/lists/kappapsi_grad/ should be rwxrwsr-x
and permissions on /var/lib/mailman/lists/kappapsi_grad/config.pck should be `rw-rw----. The owner is not important, but the group must be the group mailman runs as.
Mailman's bin/check_perms -f
run as root should fix this.
-- Mark Sapiro <mark@msapiro.net<mailto:mark@msapiro.net><mailto:mark@msapiro.net>> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list -- mailman-users@python.org<mailto:mailman-users@python.org><mailto:mailman-users@python.org> To unsubscribe send an email to mailman-users-leave@python.org<mailto:mailman-users-leave@python.org><mailto:mailman-users-leave@python.org> https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs
Mailman-Users mailing list -- mailman-users@python.org To unsubscribe send an email to mailman-users-leave@python.org https://mail.python.org/mailman3/lists/mailman-users.python.org/ Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/ https://mail.python.org/archives/list/mailman-users@python.org/
-- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group
Institutions do not have opinions, merely customs
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 10/21/22 16:50, Bruce Johnson via Mailman-Users wrote:
Ugh, my elation at this fixing it was short lived. It’s back to the "Bug in Mailman" screen. still seeing the error :
admin(76376): IOError: [Errno 13] Permission denied: '/var/lib/mailman/lists/kappapsi_grad/config.pck.tmp.dhbmailman2.Pharmacy.Arizona.EDU<http://Pharmacy.Arizona.EDU>.76376'
Permissions appear correct per you last message:
drwxr-sr-x 2 mailman mailman 47 Oct 21 04:30 kappapsi_grad
That's not what I said. the directory MUST be group writable - drwxrwsr-x
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Bruce Johnson
-
Mark Sapiro