Transfer files via SSH to datafolder in nextcloud

Hi

Now I understand that transferring a lot of files via Webdav is very slow.
So, how do i transfer files via SSH from client (windows) to the server (R PI3)?
I’ve tried to use the psftp.exe but i got a message saying “acess denied”!! even as root
I believe that this is related to the permission to acess files. I’ve created in NC a user “ricardo” and so it’s natural that only “ricardo” user can copy files to datafolder of “ricardo”

How do I overcome this. Newbie here :smile:

thanks in advance

I wrote a somewhat related article that you can check out

https://ownyourbits.com/2017/04/18/different-ways-to-access-your-nextcloud-files/

Maybe the pushpi script would be helpful for you. Also look at the SSHfs section for inspiration :wink:

In any case, in order to use scp/ssh/rsync, you need a system user ( not a nextcloud user ). That user would be for example the default user pi, and you would need to create it through the terminal ( be it SSH or plugging in a keyboard ).

SSH/SCP/rsync are not aware of your Nextcloud credentials, but of your system credentials.

Hope it makes sense :slight_smile:

Yes I’ve read your post.
I’ve concluded that the best way to do it is by SSH, but i have permission problems.

i’ve done something like this

pscp -r -i C:\sitedeploy\abt-keypair.ppk includes\ root@mysite.com:/media/…/ricardo/files/includes/

cheers

if you want to use SCP you need to be aware the permissions, yes

Nextcloud files are owned by the www-data user that runs the web server.

you would have do something like adding your user (say ‘ricardo’) to the www-data group and make sure that the data folder has read and write permissions for the www-data group.

Then try something like

pscp ........... ricardo@mysite.com:/path/to/ricardo/files/includes

If you read the post, you already know that then you have to scan for new files so the new files that you copied externally are recognized by Nextcloud

How can i do that on Odroid HC2?

Basically, I’m trying to sync a folder from my Android to my nextcloudpi with this app using SSH:
https://gitlab.com/fengshaun/syncopoli/tree/HEAD

i can only access SSH with user “root” so my user “ncp” can’t see files transfered by “root” due to permission problem.

(can i make user"ncp" to connect with SSH on NextcloudPi?)

sorry i’m a bit lost :slight_smile: