Topic "chroot jail : problems logging in: a suggestion"

Author Message
baughmankr

Guest


I was having no luck logging into an account set up with a chroot jail on my server. This was an older web site before I set up chroot jail. No matter what I did: SCP, SFTP, SFTP with SCP fallback -- I could not log in.

SCP kept saying:

Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).

SFTP kept saying:

Cannot initialize SFTP protocol. Is the host running a SFTP server? Connection has been unexpectedly closed. Server sent command exit status 1.

/var/log/messages kept showing a session opening and closing with no useful error messages.

Finally a clue in /var/log/secure:

chroot dir writable by group: /var/www/html/name_of_web_dir

Yep. For chroot, the top level directory cannot be group writeable. chmod 755 name_of_webdir solved my problem ... 1 hour later!!

Hope this helps someone.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
For details about error message "Cannot initialize SFTP protocol. Is the host running a SFTP server?" see:
http://winscp.net/eng/docs/message_cannot_initialize_sftp_protocol
_________________
Martin Prikryl
Guest




Man, I wish I would've found this earlier because I just wasted 5 hours trying to figure out what was wrong with my config. Nothing I read ever mentioned this IMPORTANT little fact. At least it helped me not to waste 5 more hours, or give up all together which I was on the brink of doing =)

Thanks for taking the time to share your fix!

AFP
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License