LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 07-30-2009, 03:18 PM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Rep: Reputation: 19
ProFTPd config question?


I'm following this guide to setup my server:

However, the DefaultRoot suggestion in the guide is:

DefaultRoot ~

But.. The config file has:

DefaultRoot ~ !adm

I was wondering if the latter is more secure. I installed version 1.3.2 instead of 1.3.1 and I wasn't sure if this is maybe a new security thing.

Can someone please advise what the differences are between these two lines and which one I should use?
 
Old 07-31-2009, 06:45 PM   #2
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 208

Rep: Reputation: 35
With ProFTPD the exclamation means "not."

Your example will play out as: Lock everyone into their home directory except members of group adm.

The most secure method would be DefaultRoot ~ which is without an admin group bypass, which would lock everyone into their home folders including admin group members.


Code:
<VirtualHost 192.168.10.21>
DefaultRoot / wheel
DefaultRoot ~ users
DefaultRoot ~/../../.. site-admin
DefaultRoot ~ !site-admin
DefaultChdir /ftp
</VirtualHost>
The first DefaultRoot says group wheel members default to system root with the "/" character. (This has a different effect in older versions, and it's the reason I had to edit this post.)

With the second DefaultRoot, when a user logs in that is a member of group users, they will default to /home/username. This will be their root, meaning they can't cd .. into a lower directory.

The third DefaultRoot says Site-admin group members are allowed to drop down below their default directory three levels, which is usually system root.

The fourth DefaultRoot directive also states with the tilde "~" and exclamation point "!" that members of group site-admin are NOT locked into their ftp root directory.

The last directive DefaultChdir says: If /home/username has a subdirectory named ftp, then default to /home/username/ftp The user can still cd .. down one level.

These directives will work as global defaults or virtualhost settings.

Hope that explains it.

Last edited by Suncoast; 07-31-2009 at 07:36 PM.
 
Old 07-31-2009, 09:35 PM   #3
jim.thornton
Member
 
Registered: May 2007
Posts: 430

Original Poster
Rep: Reputation: 19
Thank you so much.

So are you suggesting to setup the virtual host this way as well as DefaultRoot ~ or just the latter?
 
Old 08-01-2009, 11:10 AM   #4
Suncoast
Member
 
Registered: Apr 2009
Location: Largo, Florida
Distribution: Slackware
Posts: 208

Rep: Reputation: 35
If I were setting up the ftp server with virtual hosts, I would use the "DefaultRoot ~ "in global settings, and also in each virtualhost container. But I have not security tested this to confirm the global directive will apply to a virtual host container.

For example, I have not personally tested this -
Code:
DefaultRoot ~

<VirtualHost 1.2.3.1>
  DefaultRoot \ adm
</VirtualHost>
The virtual host does not have a default rule that would apply to any group including the users group. So does the global setting apply? It should. But as I said, I have not confirmed this.

The following is how I set it up. Only one virtual host has admin access.
Code:
DefaultRoot ~

<VirtualHost 1.2.3.1>
  DefaultRoot \ adm
  DefaultRoot ~ !adm
</VirtualHost>
<VirtualHost 1.2.3.2>
  DefaultRoot ~
</VirtualHost>
 
  


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
ProFTPd config help Deathcon_1 Linux - Server 1 06-07-2007 12:22 PM
Config Proftpd saudoi Solaris / OpenSolaris 15 11-12-2005 12:03 AM
proftpd config question gw1500se Mandriva 0 04-29-2004 06:22 PM
Help with ProFTPd config WNxSquee Linux - Software 5 01-06-2004 06:36 AM
help with proftpd config mconnors Linux - General 5 09-26-2003 03:16 PM

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

All times are GMT -5. The time now is 10:04 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