OpenWrt change ownership of file for export

Hi,

Is there a way preferably without adding whole bunch of users to openwrt to export a file to different systems that may have different users?

Thanks,

Aaron

if you use scp to copy individual files (or even a directory), it will assign the ownership as used by the target system. Is that sufficient for what you need?

Yes, that should work.

Forgot to mention I am using an NFS is it possible to use scp with it?

I just use scp from the linux CLI... you should be able to do this with the mount point and you can typically do it with any standard scp capable client (CLI or GUI based).

I don't know what happens with ownership if you mount the NFS share and copy it to your computer that way -- have you tried that?

root@OpenWrt:/mnt/sda1/share# scp client.ovpn aaron@:10.1.1.31/mnt/sda1/shared

/usr/bin/dbclient: Exited: Bad hostname
lost connection

The syntax is wrong here:

scp sourcefile user@address:destfile

Where sourcefile and destfile can be full paths.

2 Likes
scp client.ovpn aaron@10.1.1.31:/mnt/sda1/share/client.ovpn

/usr/bin/dbclient: Connection to aaron@10.1.1.31:22 exited: Connect failed: Connection refused
lost connection

does this host currently have an ssh server running and listening for incoming connections?

You could run the scp in the other direction (from the 10.1.1.31 host > the OpenWrt router).

After installing openssh-server I receive:

root@OpenWrt:/mnt/sda1/share# scp client.ovpn aaron@10.1.1.31:/mnt/sda1/share
aaron@10.1.1.31's password: 
scp: /mnt/sda1/share/client.ovpn: Permission denied

This is probably on your 10.1.1.31 host...
try another directory. Maybe your home directory (~/)

Thanks! That worked.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.