LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-23-2002, 05:49 AM   #1
gogo
Member
 
Registered: Apr 2001
Posts: 117

Rep: Reputation: 15
Question limit users to a particular directory tree - ProFTP


Hi,

I installed the ProFTP on my red hat 7.3 machine and I want to limit users to a particular directory tree.

http://www.proftpd.org/docs/faq/link...h5.html#AEN656

However, I only created the UserDir, not the Virtual Host.

So, I think ProFTP cannot help in my situation without setting a DNS and Virtual host.

<VirtualHost myhost.mynet.foo>
DefaultRoot /u2/public users,!staff
...
</VirtualHost>

Could I hidden the directories/folders like those in Window OS?

So, the user cannot view other's folder.

If so, what is the linux command?

Thanks for help.

gogo
 
Old 06-29-2002, 06:25 AM   #2
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
read the man page for ftpaccess, I think that this issue is covered in there...

Basically you want to chroot ftp users to a place on the filesystem. works well on my box, though I'm only chrooting anon users
 
Old 06-29-2002, 08:17 AM   #3
ReSync
Member
 
Registered: Jun 2002
Distribution: RedHat 7.2
Posts: 46

Rep: Reputation: 15
Use:
DefaultRoot ~

To make the users home dir root...
 
Old 07-02-2002, 11:38 PM   #4
gogo
Member
 
Registered: Apr 2001
Posts: 117

Original Poster
Rep: Reputation: 15
may i ask you is there only one default root in the apache?

or i can set several default root for different users? if so, how can i do it?

Thanks

gogo
 
Old 07-03-2002, 07:58 AM   #5
gogo
Member
 
Registered: Apr 2001
Posts: 117

Original Poster
Rep: Reputation: 15
Hi,

I read the following article and does anyone has a complete example to set the DefaultRoot?

I have several users under home directory. I want each user has his own DefaultRoot.

How should I set it?

Thanks in advance.

gogo


http://proftpd.linux.co.uk/localsite...ed/chroot.html

Example 9-1. Simple DefaultRoot setup

#
# A simple DefaultRoot setup
# limiting all users to their $HOME
#
<VirtualHost myhost.mynet.foo>
DefaultRoot ~
</VirtualHost>
In this example, all users who are members of group 'users', but not members of group "staff" are jailed into /u2/public. If a user does not meet the group-expression requirements, they login as per normal (not jailed, default directory is their home). You can use multiple DefaultRoot directives to create multiple jails inside the same directive context. If two DefaultRoot directives apply to the same user, ProFTPD arbitrarily chooses one (based on how the configuration file was parsed).

The chroot() system call simply moves the root (or "/") directory to a specified point within the filesystem. When implemented properly this has the effect of jailing a user into a particular branch of the filesystem directory structure. The security advantages of this approach are easily seen and it is a common method used by programmers and system administrators worldwide to enhance their local security models.
 
Old 07-03-2002, 08:50 AM   #6
fatgod
Member
 
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661

Rep: Reputation: 30
for what purpose are you setting up this ftp server? as you've mention apache I assume it's to let users upload stuff to their webspace...

If so then all the config options you need are available through configuring the /ect/ftpaccess file.

READ man ftpaccess. the bit that you are interested in is guestuser. this will let you chroot a real user of the system to their homedir (or anywhere you want) it's near the top. just try to set it up. when (if) you run into problems post here.
 
  


Reply



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
Limit Users Home Directory Size KrGAce Linux - Newbie 6 10-24-2005 09:48 AM
ProFTP users issue reynacho_au Linux - Software 4 12-20-2004 08:46 PM
Proftp 1.2.9 setup help with users parasbshah Linux - Networking 0 06-01-2004 02:52 AM
proftp chroot multiple users waffe Linux - General 2 11-01-2003 11:11 PM
Quota issue, hard limit doesn't limit users Gratz Linux - Software 2 09-16-2003 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:47 PM.

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