Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11th July 2012, 13:42
zoopy zoopy is offline
Junior Member
Join Date: Jul 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Could do with some help with a debian server (sftp)


Ive been trying to get a "user" setup for a friend, basically so he could enter IP address of server and it would come up with the directory structure of a certain directory but my attempts so far have failed.....

This server is bought and I have a user that was setup via a template lets call it "me" I can log in via internet explorer via (fake ip for security) and it will ask for my login and pass and off it goes no problem, but when I try the user I set up it just bounces back to the login prompt, but it can log in via filezilla for example.

I must admit now that my use of this is very limited so walk through would be very appreciated

What ive one so far

Edited sshd_config with :-

subsystem sftp internal-sftp (#ing the original line)
adding at the bottom :-
Match group sftponly
ChrootDirectory /home/%u
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no
Restarted the ssh server
Added the group sftponly

added user with

useradd -m username
Added user to sftp group with

usermod -g sftponly username
removed the shell access

usermod -s /bin/false username
Changed ownership

chown root:root /home/username
Created a fake home dir

mkdir -p /home/username/home/username
Switched user ownership

chown username:username /home/username/home/username
and then mouted a directory inside the usernames home direcory

mount -o bind /some/directory/ /home/username/home/username/new directory
I also give the user a password using passwd user

Is there anything else I need to do to make this work or will it not work at all?

Reply With Quote
Sponsored Links


Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Local mail server - final touch Alexhor Installation/Configuration 4 12th April 2012 23:33
Not working emails (DNS and postfix problem?) shekiman Installation/Configuration 9 1st March 2011 17:25
amavis & ispconfig 3 yalex2000 Installation/Configuration 20 18th February 2010 18:02
Problems with Postfix Mysql Courier PatrickAdrichem Installation/Configuration 3 13th April 2007 16:44
e-mail problem!!! Debian 3.1 maroonworks Installation/Configuration 18 6th December 2005 15:42

All times are GMT +2. The time now is 00:11.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.