Operating System - HP-UX
1855040 Members
7668 Online
104109 Solutions
New Discussion

Re: sftp only working for root

 
SOLVED
Go to solution
Mikael Viklund
Occasional Advisor

sftp only working for root

Hello. I have a problem with sftp, when I run sftp from another host to the hp-ux machine it works fine. but when I try to login as another user it fails with this message in syslog:Oct 14 13:21:12 chastity sshd[14423]: error: subsystem: cannot stat /usr/local/libexec/sftp-server: Permission denied Oct 14 13:21:12 chastity sshd[14423]: subsystem request for sftp failed, subsystem not found As far as I can see the permisions are ok. -rwxr-xr-x 1 root sys 176224 Sep 8 14:43 /usr/local/libexec/sftp-server Openssh is version SSH-2.0-OpenSSH_3.6.1p2and the os is:HP-UX chastity B.11.11 U 9000/800 841960611 unlimited-user license
7 REPLIES 7
Mark Grant
Honored Contributor

Re: sftp only working for root

check the permissions on the directory that it's in too.
Never preceed any demonstration with anything more predictive than "watch this"
john korterman
Honored Contributor

Re: sftp only working for root

Hi,
what does
# ls -ld d /usr/local/libexec
show?

regards,
John K.
it would be nice if you always got a second chance
Mikael Viklund
Occasional Advisor

Re: sftp only working for root

Duh, the libexec dir was only rx by root, fixing that helped some, but not I get 'Received message too long 459092539' instead :(
john korterman
Honored Contributor

Re: sftp only working for root

Hi,
try and check this thread, which - despite the title - has something to do with your problem.
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0xe9c4d7d96cbad711900a0090279cd0f9%2C00.html&admit=716493758+1066133202999+28353475

regards,
John K.
it would be nice if you always got a second chance
Mark Grant
Honored Contributor
Solution

Re: sftp only working for root

This shows one of the oddities in sftp i.e. it actually needs ssh which sadly, needs the users shell. The message you are getting is probably because your .profile/.bashrc/whatever is outputting some text that is corrupting the protocol. You need to either take them out or at least put a test in the .profile tosee if you have a tty ("tty"" might be a good option here)

Never preceed any demonstration with anything more predictive than "watch this"
Mikael Viklund
Occasional Advisor

Re: sftp only working for root

Thank you all for the fast replys. I got ridth of the "message to long" by removing some output from my .tcshrc.
T G Manikandan
Honored Contributor

Re: sftp only working for root


What shell you have for the user.
Make sure you have some login shell