Hello everyone
I am trying to install nextcloud on Fedora Server using this tutorial https://fedoramagazine.org/build-your-own-cloud-with-fedora-31-and-nextcloud-server/ but with data set in /opt/nextcloud catalogue. Unfortunately I am still getting this annoying warning “can’t create or write data directory”
These are my ls -la #data directory
[root@fedora-server szymon]# ls -la /opt/
razem 0
drwxr-xr-x. 3 root root 23 05-20 15:40 .
dr-xr-xr-x. 17 root root 224 05-19 14:46 …
drwxr-xr-x. 2 apache apache 6 05-20 15:40 nextcloud
So I assume you have all the steps completed up to the point where you need to access the web interface (Step 3).
I also have a separate data directory as well for my system. You need to edit nextcloud’s config.php file if that is the case. See the configuration parameters on docs.nextcloud.com for config.php.
Since you also mention SELinux, you may need to give the SELinux running on your system a head’s up on what you’re doing as well. That’s under the SELinux section, also on docs.nextcloud.com.
Thanks a lot for your help, of course I should change those lines from howto, now i dont understand this
Even after setting context opt is still unconfined
[szymon@fedora-server config]$ ls -Z /opt
unconfined_u:object_r:usr_t:s0 nextcloud
[szymon@fedora-server config]$ sudo semanage fcontext -a -t httpd_sys_rw_content_t '/opt/(/.)?’
ValueError: Kontekst pliku dla /opt/(/.)? jest już określony
(Meaning context for opt is set)
[szymon@fedora-server config]$ ls -Z /opt
unconfined_u:object_r:usr_t:s0 nextcloud