Restricting ftp users to html directory

Hi
Is there a way to setup new and existing siteworx accounts so when ftp is used they are restricted to html directory, a suppressing amount
of users do not know what they are doing and end up either uploading to the wrong directory or deleting all the files in root.

Than you

Hi Bear

Good question and I believe this can be achieved by adding additional lines in FTP config .

The exact lines I am not sure, but I changed ours to not allow executable files such as .exe or .com etc… to be uploaded or have a file already in their ftp folders renamed as executable

Many thanks

John

I will have a search and find out, thank you

Hi Bear

I think the following may help you

Many thanks

John

The syntax for the DefaultRoot directive is:

DefaultRoot DIRECTORY USER(S)

You can make DefaultRoot entries at the bottom of the proftpd.conf file.

Example 1: To restrict the user ‘myname’ to their home directory, you would make the following addition to the proftpd.conf file:

DefaultRoot ~ myname

The ~ represents the home directory of any user, so this would restrict the user myname to their home directory when in FTP.

Example 2 - To restrict the user myname to a vhost directory, the following entry could be made:

DefaultRoot /home/unixname/domain.url/html/ myname

You need to restart ProFTP when changed

Sorry I missed your comment John, thank you for the information.

It seams quite easy to restrict individuals to a directory but I could not find a way to restrict all users of the server to html directory without listing every users in the proftpd.conf.