Because of a kernel update that went horribly wrong, I’ve had to reinstall my machine. However, my old files were kept on an external harddrive, so they’re still intact.
Is there some way to import these files into the new installation without having to download them and then reupload them?
Then add it under admin settings as external harddrive. There can you set which user/group can get access to the harddrive.
You can´t use your harddrive now anymore. It´s in your system now!
2. Second way with Copy to special user:
Copy your files and directories to the user data folder.
Use command
cp -aR /mountdirectory_of_external_hdd/files/* /var/www/nextcloud/data/USERNAME OF NEXTCLOUD/files/
or different commands like:
rsync -avr /mountdirectoy_of_external_hdd/files/* /var/www/nextcloud/data/USERNAME OF NEXTCLOUD/files/
After that you need to fix the file permissions:
cd /var/www/
(sudo) chown -R www-data:www-data nextcloud
(sudo) find nextcloud/ -type d -exec chmod 750 {} ;
(sudo) find nextcloud/ -type f -exec chmod 640 {} ;