NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
SFTP problem


Joined: 24 Jun 2019
Posts: 29
Reply with quote
Hi,

I have problem with SFTP connection to server.
Login data is correct (filezilla, winscp works normally), but PhpED throws:
"couldn't open remote directory: Permission denied"

This is server logs:

Jun 24 15:24:05 server sshd[6961]: Accepted password for xxxx from xxxx port 54651 ssh2
Jun 24 15:24:05 server sshd[6961]: pam_unix(sshd:session): session opened for user xxxx by (uid=0)
Jun 24 15:24:34 server sshd[6961]: pam_unix(sshd:session): session closed for user xxxx

Any help is much appreciated!

Thanks
View user's profileFind all posts by dp41646Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
If you're working locally try to stop sshd as a system service, then run it (/usr/sbin/sshd or /sbin/sshd depending on the system) in console with -d 3 option for max debug level and -b to stay foreground. It will accept just one connection / client and will quit as soon as connection is closed. All the log will be shown on the console.
If you're working remotely, you can't stop sshd. In this case can try to run 2nd instance of sshd. Pick new TCP port, such as 15001, and run sshd with the same options as above, plus -p 15001. Account settings in PhpED should be updated accordingly to use this port instead of 22.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Jun 2019
Posts: 29
Reply with quote
I tried to stop sshd service, but no change unfortunately.
I am working on Windows.

I would really need sftp connection, because plain FTP puts wrong timestamp on uploaded files, so sync to server is practically impossible.
Any other idea regarding this?

Thank you
View user's profileFind all posts by dp41646Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
according to your logs, sshd is running on your server. Did you try to get more logs from it as I suggested?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Jun 2019
Posts: 29
Reply with quote
Hi Dmitri,

I have just sent you PM with all logs.
Hope it will help.

Thank you
View user's profileFind all posts by dp41646Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
I didn't find any problems with authentication, except minor warning about public key authentication. You may want to disable it on SSH Keys tab if you don't use this feature. But anyway, authentication with user/password worked good for you.
Probably the problem has something to with settings. Can you please show me screenshot of corresponding pages in the project _and_ sftp account settings?
Is there chance you entered some root directory in the account settings, then set the same root in the project? If you did, they are concatenated and formed non-existent path. For non existent path server might misleadingly reply permissions denied.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 24 Jun 2019
Posts: 29
Reply with quote
Dmitri,

yes, the problem was in directories.
Inside accounts settings, when a new sftp account is added, by default "root directory" have forward slash, which I haven't changed.
In projects settings top publishing directory was set to /public_html.
If slash from accounts is removed, everything is ok, and connection is successfully made.
I guess that because of concatenation, path was formed something similar to "//public_html", and probably that was a problem.

Thank you very much for your help!
View user's profileFind all posts by dp41646Send private message
SFTP problem
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic