u-restrict-mode NcFTPd general.cf file configuration
Don't forget to restart NcFTPd after modifying the general.cf file.

When a user is considered restricted, there are different ways to restrict them. These include confining a user to their home directory or confining them to a subdirectory of their home directory. You may also apply NcFTPd Extended User Permissions to the current user class by providing a user permissions string.

Most sites will want to set u-restrict-mode=homedir.  This is the default and should be left that way even you do not use restricted users.

In addition to (or in place of) the homedir keyword, you can add a user permissions string by appending a comma followed by the string. Here's an example that uses homedir to restrict the user to his home directory, but also uses a user permissions string to cause the user to have read-only access to the filesystem:

Here's the same example, but without restricting the user to his home directory:

If you just want to have users not confined to their home directories, you can set:

Note: As of NcFTPd 2.8.1, users are restricted to their home directory by default, so the unrestricted value will be useful if you want to revert to the 2.8.0 and earlier behavior, where users were not restricted to their home directories by default.

There are many more permissions you can control. Read about extended user permissions for an idea of what you can configure. Read the section on user classes to see how you can use u-restrict-mode and u-restricted-groups more than once to configure more than one user class. (This feature requires NcFTPd 2.8.0 or newer.)

If you want, you can have all users restricted to their $HOME/public_html directory for example.  You could do this by the following example, but note that the subdir-of-homedir applies to all user classes.

A variant of the above is to specify an absolute path using the root keyword. It also applies to all user classes, so avoid using it if you can:


See Also:

Previous: u-restrict-etc NcFTPd Home Next: u-restricted-groups