LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2014, 08:42 AM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 538

Rep: Reputation: Disabled
sftp chroot directory


I have a ftpuser, and am trying to limit them to the /var/www directory. When I sftp, it is not able to connect. But if I have the directory set to /home, then it is able to connect. This is the code that I'm using to chroot:

Code:
Match User ftpuser
    ChrootDirectory /var/www
    AllowTCPForwarding no
    X11Forwarding no
    ForceCommand internal-sftp
In filezilla, I get the error about a network error, and that software caused the connection abort.
 
Old 08-08-2014, 11:27 AM   #2
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
What are the permissions on /var/www?
 
Old 08-08-2014, 04:58 PM   #3
sniper8752
Member
 
Registered: Oct 2012
Posts: 538

Original Poster
Rep: Reputation: Disabled
777 root:root:
 
Old 08-10-2014, 11:31 AM   #4
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
The permissions should be 755 or ssh will complain. Also check sshd logs for any other clues.

Check that ssh is open on your firewall too.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: SFTP Jail (chroot) with Active Directory authentication LXer Syndicated Linux News 0 05-23-2013 06:11 AM
SFTP logging for Chroot on CentOS 6.2 with openssh-5.3 not working (internal-sftp) RatherBFishin Linux - Server 1 08-30-2012 07:45 PM
SFTP Chroot Greedyh4mster Linux - Newbie 1 09-27-2010 12:26 AM
chroot sftp - restritct home directory access ctb123 Linux - Security 1 12-22-2006 09:15 AM
sftp + chroot ... almost schwing Linux - Software 1 10-26-2003 09:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration