Hello all,
I would like to learn a little about the occ in nextcloud, this would primarily be so that I can load data onto the server via ssh or ftp, or something else, i.e. outside of Nextcloud, then use the files:scan command to reindex the files for that user.
I use the command line very basically for ssh on OMV, and I can do basic things like rename files, delete stuff, run nano and navigate around (usually getting lost).
So, in order to use the occ command, I understand that I need to do so as the HTTP user, which is, on Debian: www-data.
I have created a user on OMV (nick) and added it to ssh, sudo, users in the OMV web GUI.
I think I then need to change to the directory where the php file is that runs occ and change user to run as the HTTP user (www-data) so I:
cd srv/dev-disk-by-uuid-12e915d2-077d-412b-9876-a2ff94c50866/appdata/nextcloud/config/www/nextcloud
Then run my command as the www-data user, which gives me the output below (for any command)
$ sudo -u www-data php occ app:list
Cannot write into "config" directory!
This can usually be fixed by giving the web server write access to the config directory.
But, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it.
See https://docs.nextcloud.com/server/24/go.php?to=admin-config
I can go and follow the instructions to give the web server write access to the config directory, but is this okay and have I done things right so far? Its all new to me so I just want to be sure I'm on the right track here!
Thanks,
Nick.