Page 1 of 1

Problems with permissions after upgrade Mail and others

Posted: Mon 26. Oct 2026, 20:44
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.

Re: Problems with permissions after upgrade Mail and others

Posted: Mon 26. Oct 2026, 21:17
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?

Re: Problems with permissions after upgrade Mail and others

Posted: Tue 27. Oct 2026, 10:04
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.

Re: Problems with permissions after upgrade Mail and others

Posted: Tue 27. Oct 2026, 17:10
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.

Re: Problems with permissions after upgrade Mail and others

Posted: Tue 27. Oct 2026, 17:48
by Tobi
The mail files should be at:
/var/mail/vhosts/

Look inside this dir.

Re: Problems with permissions after upgrade Mail and others

Posted: Tue 27. Oct 2026, 18:26
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.

Re: Problems with permissions after upgrade Mail and others

Posted: Tue 27. Oct 2026, 18:29
by Tobi
KeyHelp does not delete any userfiles (including email) during an upgrade.