Problems with permissions after upgrade Mail and others

Discussions about the usage of KeyHelp.
Post Reply
lmarcos
Posts: 88
Joined: Sun 26. Jan 2020, 12:55

Problems with permissions after upgrade Mail and others

Post by lmarcos »

I've been running into a lot of problems with permissions after upgrading to Ubuntu 24.04 on one of my servers.

The most important is recovering the mail folders and the reception of emails (last received on Saturday, before the upgrade, but I now realize the problems started earlier).

The mail client I was using was Rainloop, but since it's been removed and the substitute as well, I've just switched to Roundcube today after finding no mail folders. Someting like 15 days ago I was still able to access all the folders on Rainloop.

The error I have now is and I don't know which user has to actually own and have permissions for it.
Error: Mailbox INBOX: Failed to autocreate mailbox: Internal error occurred. Refer to server log for more information. [2026-10-26 20:15:15]
Error: mkdir(/var/mail/vhosts/domain.tld/user) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: /var, dir owned by 0:0 mode=0755)

I'm having problems with Nextcloud and other software as well, including some sql queries in adminer for a certain user, and some of the permissions that appear as user user should actually be www-data www-data according to the software documentation, so I'm not sure about what happened.
lmarcos
Posts: 88
Joined: Sun 26. Jan 2020, 12:55

Re: Problems with permissions after upgrade Mail and others

Post by lmarcos »

Looks like I can't edit the OP. If I chmod to vmail:vmail will the inbox in the mobile disappear and all the remaining incoming mails will disappear?
User avatar
Alexander
Keyweb AG
Posts: 5047
Joined: Wed 20. Jan 2016, 02:23

Re: Problems with permissions after upgrade Mail and others

Post by Alexander »

I've been running into a lot of problems with permissions after upgrading to Ubuntu 24.04 on one of my servers.
For other users reading this thread: I just want to point out, the dist-upgrade does not change the permissions, this has to have other courses, not the dist-upgrade or the dist-upgrade scripts provided by KeyHelp.

---

Here are all the privileges of a working mail server setup.

Code: Select all

ls -la /

drwxr-xr-x  14 root    root        4096 Feb 10  2025 var

Code: Select all

ls -la /var/

drwxrwsrwx  3 vmail vmail   4096 Apr 26  2019 mail

Code: Select all

ls -la /var/mail/

drwxr-sr-x  8 vmail vmail 4096 Sep 25 10:54 vhosts

Code: Select all

ls -la /var/mail/vhosts/

drwxr-sr-x 4 vmail vmail 4096 Feb 10  2025 example.com

Code: Select all

ls -la /var/mail/vhosts/example.com/info/

drwx--S---  2 vmail vmail  180224 Okt 26 10:54  cur
drwx--S---  5 vmail vmail    4096 Okt 20 12:16  .Junk
drwx--S---  2 vmail vmail   20480 Okt 27 07:33  new
...

Just ask, which other directory permissions you need.

---

By the way, with the upcoming KeyHelp 26.2 there is the Tachyon - a drop-in replacement for Rainloop/Snappymail part of the update.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
lmarcos
Posts: 88
Joined: Sun 26. Jan 2020, 12:55

Re: Problems with permissions after upgrade Mail and others

Post by lmarcos »

Alexander wrote: ↑Tue 27. Oct 2026, 10:04
Just ask, which other directory permissions you need.
I've manage to sort the other permissions issue, but not to find the mail folders (neiter at var nor at /home/keyhelp/www/snappymail/data/_data_/_default_/storage/domain.tld/user), so I'm assuming I can't recover them and will proceed to create the folders and give them the permissions you mentioned above. Thanks for the help.
Alexander wrote: ↑Tue 27. Oct 2026, 10:04By the way, with the upcoming KeyHelp 26.2 there is the Tachyon - a drop-in replacement for Rainloop/Snappymail part of the update.
Thanks for the info.
User avatar
Tobi
Community Moderator
Posts: 3755
Joined: Thu 5. Jan 2017, 13:24

Re: Problems with permissions after upgrade Mail and others

Post by Tobi »

The mail files should be at:
/var/mail/vhosts/

Look inside this dir.
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
lmarcos
Posts: 88
Joined: Sun 26. Jan 2020, 12:55

Re: Problems with permissions after upgrade Mail and others

Post by lmarcos »

The mail folder in /var disappeared completely some time between October 15-16th to October 26th. The last email received was this Saturday. The Ubuntu upgrade, with the script here, was made either Saturday afternoon or Sunday.
User avatar
Tobi
Community Moderator
Posts: 3755
Joined: Thu 5. Jan 2017, 13:24

Re: Problems with permissions after upgrade Mail and others

Post by Tobi »

KeyHelp does not delete any userfiles (including email) during an upgrade.
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
Post Reply