Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon May 03, 2010 7:38 pm 
Offline
Senior Newbie
User avatar

Joined: Fri Apr 23, 2010 5:24 pm
Posts: 16
Location: West Coast
Currently using Linode 360 Ubuntu 9.10 with LAMP stack. I used the "adduser" command and created a secondary user name.

When I use Filezilla and input the IP address, user, password and port (22), I get the security certificate message. I accept yes and I notice that the IP address is preceded by the moniker SFTP. I'm assuming I am in SFTP mode?

The user name I created has full access to all directories. I only wish the user to have access to the /srv/www/public_html/ folder to upload website files.

How do I change it to where upon bootup in Filezilla, it takes the user to that specific directory instead of full access? I did a full read of the users and groups documentation in the library but didn't see much about changing directories in default FTP/SFTP logins for created users.


Top
   
 Post subject:
PostPosted: Mon May 03, 2010 10:56 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Edit your /etc/ssh/sshd_config with the following changes

Set
Code:
Subsystem sftp internal-sftp


Code:
Match Group <usergroup>
   ChrootDirectory /srv/www/public_html/


The directory /srv/www/public_html/ must be root owned and not writable by other users or groups (so you might want to set it to /srv/www)

Replacing the <usergroup> with the group of your new user (should be the same as your username) then restart ssh, disconnect and reconnect in filezilla.

Of course that won't stop them from accessing ssh (but it will lock them down)

Have a read of this for more information.

http://manpages.ubuntu.com/manpages/kar ... fig.5.html


Top
   
 Post subject:
PostPosted: Wed May 12, 2010 2:25 pm 
Offline
Senior Newbie
User avatar

Joined: Fri Apr 23, 2010 5:24 pm
Posts: 16
Location: West Coast
I read your reply and saw the web link. Thank you for the info. I used the vim command to edit that file. I scrolled to the bottom of the page page and this is what I saw.

Subsystem sftp /usr/lib/openssh/sftp-server

I'm a little foggy on your instructions. According to your instructions, I should delete what I have above and use this instead?

Subsystem sftp internal-sftp


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group