LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-12-2011, 07:53 AM   #1
daj_uk
LQ Newbie
 
Registered: May 2011
Posts: 3

Rep: Reputation: 0
Stop users moving up the folder structure?


Hi

I'm relatively new at the world of Linux so be gentle

I have a Ubuntu 10.10 server; I have created several users and wish them to have their own web space (with a unique domain name for each). I have therefore created www folders within their home folder and created new Virtual Servers to host each domain name and point to the users www folder in their home folder. They can then use an FTP client to upload files. This all works well.

However, I would like to stop a user from going back up a level and traversing the tree.

Assuming their home is /home/user2/www

They can currently go back up to /home and see other users names.

Can I stop this?

many thanks

Last edited by daj_uk; 05-12-2011 at 07:54 AM.
 
Old 05-12-2011, 07:57 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

What ftp service are you using on your server? Most likely, the configuration needs to be changed in order to stop it.

Josh
 
Old 05-12-2011, 08:08 AM   #3
daj_uk
LQ Newbie
 
Registered: May 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Josh

Thanks for the reply

I am running vsftpd
 
Old 05-12-2011, 08:21 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Code:
chroot_local_user=YES
That should do the trick for you man. Cheers,

Josh
 
Old 05-12-2011, 09:26 AM   #5
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
To be more specific, corp's suggestion is to uncomment a line in the /etc/vsftp.conf file.

Code:
# Uncomment to put local users in a chroot() jail in their home directory
# after login.
#
#chroot_local_user=YES
 
Old 05-12-2011, 09:29 AM   #6
daj_uk
LQ Newbie
 
Registered: May 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you -- that worked perfectly. And thanks for the quick reply.
 
Old 05-12-2011, 09:34 AM   #7
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
No problem! Mark your thread as solved and give rep if applicable, thanks!

Josh
 
  


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
[SOLVED] [APPENDED]Real moving of a folder's content to another folder. MODYSAMA Linux - Newbie 10 02-08-2011 12:30 AM
Home Jail Folder Structure like Gobolinux Directory Structure luispt Linux - General 3 07-26-2008 07:46 PM
Moving packages - linux command structure bookie Linux - Newbie 7 07-09-2007 04:47 PM
Moving certain files recursively preservice folder structure DigiTalk Linux - Newbie 11 09-08-2005 09:04 AM
ahred folder structure d_kilshtein Linux - Networking 2 10-31-2004 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:54 AM.

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