Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Oct 17, 2011 11:37 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
I would like to limit a certain user to access only to one directory in srv/www. So he can only access this directory over FTP? How to do that?


Top
   
 Post subject:
PostPosted: Mon Oct 17, 2011 11:42 am 
Offline
Senior Newbie
User avatar

Joined: Mon Aug 24, 2009 10:37 am
Posts: 18
FTP is not recommended these days, it's insecure both on the server side and with the actual connection. Instead, i recommend you look into sftp and this guide will help with that

http://library.linode.com/security/sftp-jails

Change the chrootdirectory option to whatever you need also or just add the user with their homedir set to whatever directory they should have under /srv/www


Top
   
PostPosted: Mon Oct 17, 2011 1:22 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
marko_roi wrote:
I would like to limit a certain user to access only to one directory in srv/www. So he can only access this directory over FTP? How to do that?

I use vsftpd, and if you set up per-user configuration files, you can set a per-user root for any FTP transfers.

In the main vsftpd.conf, set "user_config_dir" to a directory holding files named for each user. You can then put any configuration entries you want into those per user files. In my case, I use "local_root" in each file to establish the top of the filesystem tree that user can access (my case sounds similar to yours in that it's the root of their specific sub-tree under a staging web site).

Using vsftpd also permits virtual users, where vsftpd has it's own passwd file. If combined with guest_enable/guest_username, you can have an arbitrary number of individual FTP accounts, all of which eventually map to the same filesystem user within the web tree, simplifying access from the web server user, and without having to create actual accounts on the system outside FTP transfers.

-- David


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


Who is online

Users browsing this forum: No registered users and 2 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