Thursday, June 05, 2014

ownCloud - Security Warning: Your data directory and your files are probably accessible from the internet

The .htaccess is not really the issue. You can just put the data directory outside the folder where the program is. To change your data directory:

Assume your data are actually in /var/www/owncloud/data and you want to move them to /data

a) stop your web server

b) move your data from /var/www/owncloud/data to /data

c) edit /var/www/html/owncloud/config/config.php

d) in config.php , replace
'datadirectory' => '/var/www/owncloud/data',
by
'datadirectory' => '/data',

e) restart you web server

Enjoy!
NB: If you can't move your data out your webserver access , then check that data/.htaccess looks like :
Deny from All
IndexIgnore *

No comments: