Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> sftp to a scientific linux machine
gaurp
 Posted: Feb 1 2012, 04:55 PM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 1254
Joined: 1-February 12









Hi all,

when i am doing sftp to a scientific linux machine as a user gaurp (non root user), and when i am trying to upload the file to my home directory, it is trying to upload the file to root> home (i checked doing pwd and the present working directory was / ) directory and thus getting error permission denied. please help how could i ensure that file should get uploaded to user's home directory.
PM
^
AndrewSerk
 Posted: Feb 1 2012, 06:58 PM
Quote Post


SLF Moderator
*****

Group: Moderators
Posts: 480
Member No.: 54
Joined: 14-April 11









Hello gaurp and welcome to Scientific Linux Fora,

I assume you are using sftp with the put command. I use the remote and local path in the put command to reduce this kind of issues. Maybe this will work for you also.
Something like:
CODE
SFTP> put local-path [remote-path]

Alternatively you could use " cd " to change remote directory and " lcd " to change local working directory. Use " lpwd " to show your local working directory and " pwd " to show your remote working directory.

Hope this helps,

This post has been edited by AndrewSerk: Feb 1 2012, 07:20 PM
PM
^
gaurp
 Posted: Feb 2 2012, 06:45 AM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 1254
Joined: 1-February 12









QUOTE (AndrewSerk @ Feb 1 2012, 11:58 PM)
Hello gaurp and welcome to Scientific Linux Fora,

I assume you are using sftp with the put command. I use the remote and local path in the put command to reduce this kind of issues. Maybe this will work for you also.
Something like:
CODE
SFTP> put local-path [remote-path]

Alternatively you could use " cd " to change remote directory and " lcd " to change local working directory. Use " lpwd " to show your local working directory and " pwd " to show your remote working directory.

Hope this helps,



Thanks a lot Andrew,

Actually I have a application that creates its own user after installation. when i am doing sftp with that user's credentials than by default present working directory of remote system should be home directory of that user but unfortunately it is logging into root directory. i guess some configuration setting might be required in ssh_config file, though i am not sure.

well i am not doing SFTP directly, i am using an application that does the sftp and upload some configuration file in user's home directory.

It was working fine SUSE.
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll