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.