Cannot find the path to my nextcloud folder

Dear all,

I have a good install of Nextcloud on an OMV6 system. I have added files from the GUI interface of Nextcloud but cannot find the exact path on my OMV6 system of these folder and files. I went to /srv/dev-disk-by-uuid-83440894-4e54-45db-9b5d-4ff738731029/appdata/nextcloud/.data which is the specified path in my stack but there is nothing. I guess files should be elsewhere, but where ?

Thank you very much in advance,

Best regards,

Harold

What is the echo of

occ config:system:get datadirectory
Read → this ← if you don’t know how to work with occ yet.

Much luck,
ernolf

Unfortunately, this comand does not seem to work whan logged into my nextcloud system. Where should I type it ? Under nextcloud ?

In the shell console of course. Do you have no shell access to a server where you hosts your nextcloud?

Much luck,
ernolf

occ only works if you know the path of Nextcloud. But maybe @Harold_Mouras you can search recursive a file config.php. The Nextcloud config.php is in the folder config and then you get the path. Also you can search the file occ in the Nextcloud main directory.

I opened a terminal and logged into the folder of config.php. However, typing ```
occ config:system:get datadirectory just tells “comande introuvable”. I checked the nextcloud path into the config.php file, this is /data. When entering the path written for the nextcloud docker contain in openmediavault I just have the following content :
admin appdata_ochsvf0ry1yr files_external index.html nextcloud.log
but nothing corresponding to the data I can see in the Nextcloud GUI interface.
Thanks,
Harold

I think I have a very similar problem. I access my server via ssh but when I try to access the nextcloud directory to execute occ, I get the following error.

ncadmin@ksga:/var/www$ ls
html nextcloud
ncadmin@ksga:/var/www$ cd nextcloud
-bash: cd: nextcloud: Permission denied

I tried with sudo, and then I get:
ncadmin@ksga:/var/www$ sudo cd nextcloud
[sudo] password for ncadmin:
sudo: cd: command not found
sudo: “cd” is a shell built-in command, it cannot be run directly.
sudo: the -s option may be used to run a privileged shell.
sudo: the -D option may be used to run a command in a specific directory.

Hope someone can shed some light to resolve this problem. Thanks

You should be able to have cd and php in your path.
Yor PATH variable seems to be empty, so I’d try to execute /bin/cd or /usr/bin/cd and so on, until I find it. I don’t know how much stripped down is the guest system you’re runing.
For a proper maintenance it’s important to have the base system commands available.
After that, you should be able to cd to the path where NC is deployed (i.e. /var/www/nextcloud) and then run occ or perhaps more luckily php occ.

OCC NC’s swiss-army knife maintenance tool, it’s important to have it ready at hand.

Your data directory might very well be in /var/www/nextcloud/nextcloud-data but can actually be anywhere depending on the package manager’s preference.

Thanks a lot for your comments. I found the problem was related to permissions and I needed to become root with sudo -i to be able to access them. Probelm solved… for now. Thanks!

1 Like