Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Snappymail fails with data folder permission error #4099

Closed
imyller opened this issue Oct 25, 2023 · 9 comments · Fixed by #4349
Closed

[Bug] Snappymail fails with data folder permission error #4099

imyller opened this issue Oct 25, 2023 · 9 comments · Fixed by #4349
Labels
bug Something isn't working

Comments

@imyller
Copy link

imyller commented Oct 25, 2023

Describe the bug

After HestiaCP 1.8.10 upgrade Snappymail fails to load with error:

[202] Data folder permissions error [is_readable]

Owner of both /var/lib/snappymail/data (symlink) and /etc/snappymail/data is www-data:www-data

v-add-sys-snappymail reports that the installation is latest and ok:

# v-add-sys-snappymail 
Error: Installed version (2.29.1) is equal to the available version (2.29.1)

Could this be caused by new security hardening from secure_php.sh?

Tell us how to replicate the bug

  1. Upgrade to HestiaCP 1.8.10
  2. Open webmail.domain.tld where Snappymail is selected as webmail client
  3. Receive error '[202] Data folder permissions error [is_readable]' with HTTP/200 status

Which components are affected by this bug?

Webmail (Roundcube, SnappyMail)

Hestia Control Panel Version

1.8.10

Operating system

Ubuntu 22.04

Log capture

No response

@imyller imyller added the bug Something isn't working label Oct 25, 2023
@sahsanu
Copy link
Contributor

sahsanu commented Oct 25, 2023

To check whether disabled php functions are affecting snappymail, modify /etc/php/PHP_VERSION/fpm/php.ini

Example for PHP version 8.2:

sed -i 's/^disable_functions =.*/disable_functions = /' /etc/php/8.2/fpm/php.ini

@jaapmarcus
Copy link
Member

To check whether disabled php functions are affecting snappymail, modify /etc/php/PHP_VERSION/fpm/php.ini

Example for PHP version 8.2:

sed -i 's/^disable_functions =.*/disable_functions = /' /etc/php/8.2/fpm/php.ini

We changed the owner to hestiamail instead of www-data due to the security issue

@jaapmarcus
Copy link
Member

chown -R hestiamail:www-data /etc/snappymail/data should probally solve..

@plutocrat
Copy link

plutocrat commented Oct 25, 2023

Seems also rainloop affected.

@rjc3rd
Copy link

rjc3rd commented Oct 25, 2023

Just leaving this here to get the update/notifications, how to solve?
For now, I don't have clients on my server, so I plan to wait it out.

@jaapmarcus
Copy link
Member

chown -R hestiamail:www-data /etc/snappymail/data

Will solve the issue .... Probally will test tomorrow...

@rjc3rd
Copy link

rjc3rd commented Oct 25, 2023

First, I confirmed that Roundcube worked while Snappymail did not work.

Roundcube worked. Snappymail did not work.

chown -R hestiamail:www-data /etc/snappymail/data
Will solve the issue .... Probally will test tomorrow...

This did indeed fix the problem with Snappymail.

@imyller
Copy link
Author

imyller commented Oct 26, 2023

chown -R hestiamail:www-data /etc/snappymail/data

Fixing the owner solved the issue for Snappymail.

Owner of the data folder was www-data by default.

@plutocrat
Copy link

Snappymail installer script also needs to be adjusted.
v-add-sys-snappymail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants