Hello folks,
I have just made a fresh install of Nextcloud (v.11.0.3.2 on Debian 8) according to the manual.
So far everything seems working, redirect to always use SSL (selfsigned cert) is working too, and everything looks fine. Almost.
I used the setting-strong-directory-permissions script to make sure permissions are right. Though the instructions refer to version 9, I assume this is also applicable for the current version 11.
However, I noticed now that most subfolders are publicly accessible and its contents can be seen in the browser (even without having logged in to NC).
To be more specific, I mean folders like:
< myDomain >/nextcloud/apps/
< myDomain >/nextcloud/apps/files/
< myDomain >/nextcloud/apps/dav/
< myDomain >/nextcloud/apps/calendar/
< myDomain >/nextcloud/apps/gallery/
< myDomain >/nextcloud/apps/gallery/config/
< myDomain >/nextcloud/core/
All those urls can be entered in the browser and it will happily list its contents to the public.
The permission to those folder are set to (for example):
drwxr-x--- 45 www-data www-data 4096 May 6 02:18 apps
drwxr-x--- 7 www-data www-data 4096 May 6 02:18 dav
drwxr-x--- 16 root www-data 4096 May 6 02:18 core
…
But even worse, also:
< myDomain >/nextcloud/config/
can be reached, listing its contents in the browser showing the config.php file!
That cannot be good, right?
Permissions are:
drwxr-x--- 2 www-data www-data 4096 May 9 04:01 config
However, interestingly I noticed on the other hand, that the folder
< myDomain >/nextcloud/apps/external/
just returns a blank page. (which is good I think)
Its permissions are:
drwxr-x--- 10 www-data www-data 4096 May 6 02:18 external
It’s been a while since my last install (was an OC 5 or 6) and I think I used to harden the cloud with some .htaccess files, but I noticed there are some already existing and I don’t want to mess up my fresh install.
So, to make it short: What am I missing? Or am I just paranoid and that is supposed to be like that?
Thus, if anyone can give me some advice or point me to the right spot with instructions I would greatly appreciate that.
Thanks in advance.
Regards, Santigua