Data directory accessible from the internet

Seems lots of chatter about this on github etc but no real solution?

Admin page has warning: “Your data directory and your files are probably accessible from the internet. The .htaccess file that ownCloud provides is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root…” Any update on this?

Normally means your htaccess can’t override the default Apache config.

thanks - and the solution to this or just leave the annoyance? I am using NextCloud on a dedicated VPS.

Edit /etc/apache2/apache2.conf

Scroll to the directory area and change

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

To

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
3 Likes

Thanks. That seemed to work and then it’s back again.

It can be a bad chmod on files.

You should read the installation manual on the nextcloud site. There is a step where they give you the good permission to put on folders.

You should look the installation process from the beginning in order to see if you didn’t miss an important thing.

You can also look if in your nextcloud folder you have this two files : .htaccess and .user.ini , if not you have to pick them from your downloaded nextcloud.zip they are in the root folder

Thank you I recently had changed this back when trying to reconfigure my nextcloud hostname and just ran across the security warning in the nextcloud console. Your post just saved me a lot of time.