the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
991 stars 117 forks source link

Error 202 Data Folder Permissions Error [Is readable] #1431

Closed adamh2021 closed 7 months ago

adamh2021 commented 7 months ago

Following the instructions on the hestia documentation to install snappymail

v-add-sys-snappymail

navigated to /etc/snappymail to find the password file so that I can [webmail.domain.tld/?admin_xxxxxx] and all I see in the folder is:

.data

Look inside of .data: index.html | index.php | INSTALLED | README.md | SALT.php | VERSION

When I try to navigate to [webmail.domain.tld/?admin I see the following error Error 202 Data Folder Permissions Error [Is readable]

Not sure if this is a bug or my install hasn't gone to plan.

the-djmaze commented 7 months ago

It means that PHP has no access to the app data folder.

Read #1371

adamh2021 commented 7 months ago

Thanks for your reply - I'm not over familiar with editing from command line so I've taken my time, watched a few videos and re-read that post several times.

From what I can see, my PHP user is www-data and when looking at the data folder ' ls-l "

root@xxx:/etc/snappymail# cd /etc/snappymail/data
root@xxx:/etc/snappymail/data# ls -l
total 28
drwx------ 3 www-data www-data 4096 Nov 14 23:46 _data_
-rw------- 1 www-data www-data    9 Nov 14 23:46 index.html
-rw------- 1 www-data www-data    9 Nov 14 23:46 index.php
-rw------- 1 www-data www-data    6 Nov 14 23:46 INSTALLED
-rw-r--r-- 1 www-data root      121 Nov 22 00:55 README.md
-rw------- 1 www-data www-data  104 Nov 14 23:46 SALT.php
-rw-r--r-- 1 www-data root        6 Nov 22 00:55 VERSION

That's telling me that the PHP user has read / write / execute to the data directory - I believe....

the-djmaze commented 7 months ago

www-data is mostly not PHP. PHP-FPM runs as the user. Please check deeper in your config (and read the other issue about SELinux and other security implications)