Hello,
I want to change my hard drive where NextcloudPi is installed. After copying data on the new drive, I wanted to run nc-fix-permissions
but here are the errors I have:
{"reqId":"n8ZxSeiTpEmk3WUtZdPC","level":2,"time":"2022-10-04T16:21:12+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /media/NewDrive/ncdata/tmp is not present or writable","userAgent":"--","version":"24.0.5.1","data":[]}
Running nc-fix-permissions
fixing permissions in /media/NewDrive/ncdata... chown: impossible d'accéder à '/media/NewDrive/ncdata/\*/files': Aucun fichier ou dossier de ce type
chmod: impossible d'accéder à '/media/NewDrive/ncdata/*/files': Aucun fichier ou dossier de ce type
done
Done. Press any key...
Here are the steps I followed to be in this situation.
I have the two disks mounted at something like /media/OldDrive
and /media/NewDrive
I copied data using rsync -avz /media/OldDrive/ncdata /media/NewDrive/ncdata
I replaced the OldDrive by the NewDrive in the configuration file for the following directories:
- datadir
- tempdirectory
- logfile
I wanted to run nc-fix-permissions
but when trying to do so, I got some errors:
- .ocdata file missing; I think I fixed this, I do not see it anymore
- permissions errors
I tried to copy the permissions from /media/OldDrive to /media/NewDrive but I still have errors.
Here is the current situation:
ls -al /media/OldDrive
drwxr-xr-x 1 root root 468 27 août 03:48 .
drwxr-xr-x 4 root root 4096 2 oct. 15:01 ..
drwxrwx--- 1 www-data www-data 244 27 août 06:42 ncdata
drwxr-xr-x 1 root root 392 1 oct. 03:00 ncp-backups
drwxr-xr-x 1 root root 2314 3 oct. 20:17 ncp-snapshots
sudo ls -al /media/NewDrive
drwxrwx--- 1 root root 12 2 oct. 16:18 .
drwxr-xr-x 4 root root 4096 2 oct. 15:01 ..
drwxrwx--- 1 www-data www-data 52 3 oct. 21:35 ncdata
I do not know how permissions work in Linux so I am lost. I see there is a difference in the first line but I do not know how to copy and paste the permissions for this â.â. I am not even sure my problem comes from this.
Could someone help me how to fix this please?