Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri May 04, 2012 9:10 pm 
Offline
Senior Member

Joined: Thu Apr 12, 2012 6:26 am
Posts: 62
Location: Earth
Hi all,

I have centOS 6 installed on our Linode VPS server.
I have successfully installed FTP and created an FTP user.
However, the FTP user can view all the files on the server.
How can I restrict the FTP user to the files in a directory?

Currently, the user is sent straight to var/www/html (but this FTP user is able to view the other files on the server)
but I have created virtual hosts on the server and this FTP user should actually go to
/var/www/vhosts/mywebsite.com/httpdocs
And not be able to view the other files…
How can I achieve this?

(Here’s how I got to this point: I had added the user by doing: useradd -d /var/www/vhosts/mywebsite.com/httpdocs myftpuser
And then created and added myftpuser to /etc/vsftpd/chroot_list )

Thanks.


Top
   
 Post subject:
PostPosted: Fri May 04, 2012 11:58 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
Look into the *_chroot_* options to control where a user is restricted to after login, and if desired, combine that with per user configuration files (via user_config_dir) to set local_root individually per user.

-- David


Top
   
 Post subject:
PostPosted: Mon May 07, 2012 4:17 pm 
Offline
Senior Member

Joined: Thu Apr 12, 2012 6:26 am
Posts: 62
Location: Earth
Thanks @db31

would try it out...

Thanks a lot.


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


Who is online

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