Transfering from windows - permissions

Please be gentle as I am a linux dummy:
I have set up nextcloudpi for no other reason than I had a pi and a portable 500gb SSD and intended to use it to store photos from my phone and camera. I got it up and running and it works, the issue arose when I want to transfer my pics.
I tried initially from windows cmd using
scp -RP Pictures pi@192.168.0.145:/media/myCloudDrive/ncdata/data/ncp/files/Photo
this didn’t work becuase i didn’t have permission
so using put i changed permissions using
chmod -R 777 /media
running the scp… then worked for 40-50 files and then it stopped saying that there is no permission
if i then try and access the folder on myCloudDrive again then I don’t have permissions and I have to reset them again, using chmod
I have also tried using ftp on filezilla, but again get the same issue, but after 100-200 files are transferred, ie unable to transfer as I don’t have permission and I have to reset it using chmod

any suggestions would be greatfully received but i will need a bit of detail as I am very new at this

To access your Linux server remotely, use the Putty software.
Then connect with the root
place yourself before the /media directory with “cd”.
For example : cd /var/…

Then run the command :
sudo chmod -R 777 /media

Hi @michaux and @jonallwright

Ok. I try to be nice. But sometimes it is difficult to understand the thought processes behind some of the questions and answers here. :wink: You set up a server application like Nextcloud, which has a WebDAV interface and a WebUI to upload and manage files. But then, for some reason that you didn’t tell us, you decide using SCP instead of the built in mechanisms to transfer the files to your Nextcloud. And if that doesn’t work, someone else is suggesting, to chmod 777 the drive or folder and copy the files as root…

While copying the files as root might actually work like this, it is still another story whether Nextcloud can then do something with them. So the question I have is: Why don’t you just log into your Nextcloud and then upload the files through the webUI. Or in other words: Why not using the product as it is intendended to use? There is also a sync client available or you could connect Nextcloud as a network drive (via webDAV) to your computer.

Thanks, and I understand the frustration - in fairness you lost me at WebDAV and WebUI, but that’s because I’ve never played networks, servers etc before.
Anyway I used SCP as I was finding up loading via the webui very slow and a quick google led me to a video that showed that method, for a guy uploading 1000’s of files. (which incidentally worked and I was able to add the files abd by using nc-scan, they showed up on my webui). But when it failed part way throuh on me I was more intrigued as to why it was not working when in theory it should and why the permissions kept needing to be ammended.
As with all things of this ilk I have wasted more time trying to find a workaround that I could have uploaded all my photos by now.
Thx

Sorry if I was a bit cheeky. I am glad that it still worked out. And I guess it’s ok to use 777 on the disk, if you connect it as an “external storage” to Nextcloud and you didn’t make the whole nextcloud data folder or maybe even the whole nextcloud installation 777. But that was exactly the information that was missing in your original post…

Not cheeky at all
Thanks for the pointers and , yes it’s getting there…

1 Like