Nextcloud -- Mass Data Migration (file permissions problem)

I’m attempting to mass migrate ~3.5TB of data, locally on the server, into my Nextcloud data folder, but I have encountered permission problems.

I’m running Debian Buster (10) with KDE desktop environment and Open Media Vault 5 installed to handle most server tasks. I’m using Portainer to setup & manage all my docker images, as I am new to Linux & Docker. I pulled linuxserver/nextcloud and linuxserver/mariadb, mostly following @TechnoDadLife Nextcloud tutorial, with adaptation for OMV 5 now using Portainer to manage Docker.

I tried to adapt a Mass Data Migrate tutorial, but got confused, and ended up launching Dolphin file explorer as root (pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin) and copy my source directory into //files directory via GUI.

I then installed the OCC Web app and ran: files:scan --all
…I tried to use the OCC tool via command line, but I was unable to figure out how to do that inside a docker image. Now, when I try to sync files on Windows 10 using the Nextcloud official client, I get errors saying: Not allowed because you don’t have permission to add files in that folder. I tried creating a simple .txt via the Nextcloud web interface, so it will let me add. However, it will not let me delete the file I just created.

I bashed into my Nextcloud container: docker exec -it Nextcloud bash
Then I went to the data directory: cd /data
Then I listed out permissions:

  1. /data# ls -la
  2. total 60
  3. drwxrwx— 1 abc abc 248 Sep 19 11:30 .
  4. drwxr-xr-x 1 root root 232 Sep 16 00:34 …
  5. -rw-r–r-- 1 abc abc 324 Sep 16 00:10 .htaccess
  6. -rw-r–r-- 1 abc abc 0 Sep 16 00:10 .ocdata
  7. drwxr-xr-x 1 abc abc 10 Sep 16 00:20 Latrisha
  8. drwxr-xr-x 1 abc abc 62 Sep 19 12:47 Robert
  9. drwxr-xr-x 1 abc abc 0 Sep 16 00:13 __groupfolders
  10. drwxr-sr-x 1 abc abc 48 Sep 16 00:18 admin
  11. drwxr-sr-x 1 abc abc 120 Sep 16 00:26 appdata_ocrtydsj93s7
  12. -rw-r–r-- 1 abc abc 0 Sep 16 00:11 audit.log
  13. drwxr-xr-x 1 abc abc 26 Sep 16 00:11 files_external
  14. -rw-r–r-- 1 abc abc 0 Sep 16 00:10 index.html
  15. -rw-r----- 1 abc abc 54071 Sep 19 13:00 nextcloud.log
  16. drwxr-xr-x 1 abc abc 20 Sep 19 11:30 ownbackup

Display All

Help! ?(

P.S. My goal is to have both laptop, (and other mobile devices) sync to one of two profiles, and both profiles have access to each other’s data. I would ideally like a Samba share option too, but it looks like I can either use Nextcloud (w/client or web), or Samba, but not both. Perhaps I could use external storage in Nextcloud, but I don’t know the pro/cons and how that could have security &/or compatibility problems. Still new to Linux, Docker, etc and just trying to find the best Home NAS solution that involves syncing data in background with little user tech expertise, as well as offering a little cloud storage management.

Cross-posted:
*Linuxserver.io discourse
*OMV Forum

Looks like either restarting the docker container & or running occ files:scan --all after a chown did the trick.

1 Like