sftp get not working as expected
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to download a folder from a remote server to my local server but I'm getting unexpected results.
I used this to sftp:
$ sftp -P [the_port] user@remote_ip
this got me into the server. I then tried using this:
$ get -r /home/user/public_html/images/ /var/www/mySite/
However, it returns the error:
mkdir /var/www/mySite: Permission denied
which doesn't make sense to me, according to here I should be able to use get like this:
get [-P] remote-path [local-path]
but it seems it's trying to get the remote-path and place it on the remote-server. Using autocomplete confirms this, doing:
/var/ (tab) -> shows the www dir as expected
/var/www/ (tab) -> shows none of my local machine's /var/www/ folders.
Where am I going wrong in using the get
command?
linux permissions sftp
add a comment |
up vote
0
down vote
favorite
I'm trying to download a folder from a remote server to my local server but I'm getting unexpected results.
I used this to sftp:
$ sftp -P [the_port] user@remote_ip
this got me into the server. I then tried using this:
$ get -r /home/user/public_html/images/ /var/www/mySite/
However, it returns the error:
mkdir /var/www/mySite: Permission denied
which doesn't make sense to me, according to here I should be able to use get like this:
get [-P] remote-path [local-path]
but it seems it's trying to get the remote-path and place it on the remote-server. Using autocomplete confirms this, doing:
/var/ (tab) -> shows the www dir as expected
/var/www/ (tab) -> shows none of my local machine's /var/www/ folders.
Where am I going wrong in using the get
command?
linux permissions sftp
@fra-san in the past I've used tab and it shows my local system path? and how do I check if I have permissions
– treyBake
2 days ago
Showing local paths with tab insftp
prompt? I am not able to reproduce, nor to find hints on how to do that. About permissions: try getting the remote site somewhere in your/home/your_user/
directory. In a standard setup you will have to be root to put it in/var/www/
(or the user that runs a web server and owns/var/www
, if you have one).
– fra-san
2 days ago
Correction about completion: if it is enabled, it will tab-complete both remote and local paths in command lines assftp user@host:/remote/path /local/path
(of course, public key, or otherwise password-less, authentication must be enabled). Tab-completion in asftp
prompt will complete only remote paths after the commandget
and only local paths after the commandput
. Tested onbash
andzsh
.
– fra-san
yesterday
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to download a folder from a remote server to my local server but I'm getting unexpected results.
I used this to sftp:
$ sftp -P [the_port] user@remote_ip
this got me into the server. I then tried using this:
$ get -r /home/user/public_html/images/ /var/www/mySite/
However, it returns the error:
mkdir /var/www/mySite: Permission denied
which doesn't make sense to me, according to here I should be able to use get like this:
get [-P] remote-path [local-path]
but it seems it's trying to get the remote-path and place it on the remote-server. Using autocomplete confirms this, doing:
/var/ (tab) -> shows the www dir as expected
/var/www/ (tab) -> shows none of my local machine's /var/www/ folders.
Where am I going wrong in using the get
command?
linux permissions sftp
I'm trying to download a folder from a remote server to my local server but I'm getting unexpected results.
I used this to sftp:
$ sftp -P [the_port] user@remote_ip
this got me into the server. I then tried using this:
$ get -r /home/user/public_html/images/ /var/www/mySite/
However, it returns the error:
mkdir /var/www/mySite: Permission denied
which doesn't make sense to me, according to here I should be able to use get like this:
get [-P] remote-path [local-path]
but it seems it's trying to get the remote-path and place it on the remote-server. Using autocomplete confirms this, doing:
/var/ (tab) -> shows the www dir as expected
/var/www/ (tab) -> shows none of my local machine's /var/www/ folders.
Where am I going wrong in using the get
command?
linux permissions sftp
linux permissions sftp
edited 2 days ago
Jeff Schaller
36k952119
36k952119
asked 2 days ago
treyBake
229112
229112
@fra-san in the past I've used tab and it shows my local system path? and how do I check if I have permissions
– treyBake
2 days ago
Showing local paths with tab insftp
prompt? I am not able to reproduce, nor to find hints on how to do that. About permissions: try getting the remote site somewhere in your/home/your_user/
directory. In a standard setup you will have to be root to put it in/var/www/
(or the user that runs a web server and owns/var/www
, if you have one).
– fra-san
2 days ago
Correction about completion: if it is enabled, it will tab-complete both remote and local paths in command lines assftp user@host:/remote/path /local/path
(of course, public key, or otherwise password-less, authentication must be enabled). Tab-completion in asftp
prompt will complete only remote paths after the commandget
and only local paths after the commandput
. Tested onbash
andzsh
.
– fra-san
yesterday
add a comment |
@fra-san in the past I've used tab and it shows my local system path? and how do I check if I have permissions
– treyBake
2 days ago
Showing local paths with tab insftp
prompt? I am not able to reproduce, nor to find hints on how to do that. About permissions: try getting the remote site somewhere in your/home/your_user/
directory. In a standard setup you will have to be root to put it in/var/www/
(or the user that runs a web server and owns/var/www
, if you have one).
– fra-san
2 days ago
Correction about completion: if it is enabled, it will tab-complete both remote and local paths in command lines assftp user@host:/remote/path /local/path
(of course, public key, or otherwise password-less, authentication must be enabled). Tab-completion in asftp
prompt will complete only remote paths after the commandget
and only local paths after the commandput
. Tested onbash
andzsh
.
– fra-san
yesterday
@fra-san in the past I've used tab and it shows my local system path? and how do I check if I have permissions
– treyBake
2 days ago
@fra-san in the past I've used tab and it shows my local system path? and how do I check if I have permissions
– treyBake
2 days ago
Showing local paths with tab in
sftp
prompt? I am not able to reproduce, nor to find hints on how to do that. About permissions: try getting the remote site somewhere in your /home/your_user/
directory. In a standard setup you will have to be root to put it in /var/www/
(or the user that runs a web server and owns /var/www
, if you have one).– fra-san
2 days ago
Showing local paths with tab in
sftp
prompt? I am not able to reproduce, nor to find hints on how to do that. About permissions: try getting the remote site somewhere in your /home/your_user/
directory. In a standard setup you will have to be root to put it in /var/www/
(or the user that runs a web server and owns /var/www
, if you have one).– fra-san
2 days ago
Correction about completion: if it is enabled, it will tab-complete both remote and local paths in command lines as
sftp user@host:/remote/path /local/path
(of course, public key, or otherwise password-less, authentication must be enabled). Tab-completion in a sftp
prompt will complete only remote paths after the command get
and only local paths after the command put
. Tested on bash
and zsh
.– fra-san
yesterday
Correction about completion: if it is enabled, it will tab-complete both remote and local paths in command lines as
sftp user@host:/remote/path /local/path
(of course, public key, or otherwise password-less, authentication must be enabled). Tab-completion in a sftp
prompt will complete only remote paths after the command get
and only local paths after the command put
. Tested on bash
and zsh
.– fra-san
yesterday
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482128%2fsftp-get-not-working-as-expected%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@fra-san in the past I've used tab and it shows my local system path? and how do I check if I have permissions
– treyBake
2 days ago
Showing local paths with tab in
sftp
prompt? I am not able to reproduce, nor to find hints on how to do that. About permissions: try getting the remote site somewhere in your/home/your_user/
directory. In a standard setup you will have to be root to put it in/var/www/
(or the user that runs a web server and owns/var/www
, if you have one).– fra-san
2 days ago
Correction about completion: if it is enabled, it will tab-complete both remote and local paths in command lines as
sftp user@host:/remote/path /local/path
(of course, public key, or otherwise password-less, authentication must be enabled). Tab-completion in asftp
prompt will complete only remote paths after the commandget
and only local paths after the commandput
. Tested onbash
andzsh
.– fra-san
yesterday