NextCloud data outside public_html?

Hello everyone!

I’m trying to install NextCloud and using the defaults it’s working great but I would like to move the data directory outside of the public_html folder for security reasons. Now I created a data folder on the same level as public_html, given it the same ownership and rights yet NextCloud says it’s unable to write in it. Obviously I don’t want to resort to giving it 777 rights which would somewhat defeat the purpose.

I’ve also tried creating the data folder in my user’s home folder with the same results. Using Ubuntu 20.04, I’ve tried both setting the user as group and user like the other folders but also tried www-data:www-data just in case but it didn’t work either.

I’ve searched this forum and Google a lot but this doesn’t seem to be something that people asked before.

I also tried creating the data folder both in the Hestia CP file manager and through SSH.

I didn’t use the Hestia NextCloud install because it acted weird so this is all manual installation.

Can anyone help me with this?


Its a php open_basedir issue I think. You’ll probably have to copy the default template and make a nextcloud template which includes your chosen open_basedir location.
Hopefully that gives you the ammunition for further forum searches.

Awesome that worked! Cheers! :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.