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 Techno Dad Life’s 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_S ) and copy my source directory into my Nexcloud data directory/USER/files.
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: /data# ls -la
drwxrwx— 1 abc abc 248 Sep 19 11:30 .
drwxr-xr-x 1 root root 232 Sep 16 00:34 …
-rw-r–r-- 1 abc abc 324 Sep 16 00:10 .htaccess
-rw-r–r-- 1 abc abc 0 Sep 16 00:10 .ocdata
drwxr-xr-x 1 abc abc 10 Sep 16 00:20 Latrisha
drwxr-xr-x 1 abc abc 62 Sep 19 12:47 Robert
drwxr-xr-x 1 abc abc 0 Sep 16 00:13 __groupfolders
drwxr-sr-x 1 abc abc 48 Sep 16 00:18 admin
drwxr-sr-x 1 abc abc 120 Sep 16 00:26 appdata_ocrtydsj93s7
-rw-r–r-- 1 abc abc 0 Sep 16 00:11 audit.log
drwxr-xr-x 1 abc abc 26 Sep 16 00:11 files_external
-rw-r–r-- 1 abc abc 0 Sep 16 00:10 index.html
-rw-r----- 1 abc abc 54071 Sep 19 13:00 nextcloud.log
drwxr-xr-x 1 abc abc 20 Sep 19 11:30 ownbackup
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.
Crossposted on OMV Forum (I have a new user link limit): https://forum.openmediavault.org/index.php/Thread/28739-Nextcloud-Mass-Data-Migration-file-permissions-problem/?postID=214018#post214018