Password protecting a directory


To password protect a directory, do the following:

  1. Sign in to Virtualmin.
  2. Click Services in the left-hand navigation, then click Protected Directories.
  3. Click Add protection for a new directory.
  4. Under Website subdirectory, pick an option that suits you needs. Whatever you use for Sub-directory will be relative to your virtual server's document root (web/public).
  5. Under Authentication realm, enter anything to 'name' the protected resource. The realm is simply a description for the password-protected directory, which is displayed in the users' browsers when they try to login. You can enter anything, such as Private files or Database access.
  6. Click Create. You should now see a listing of your protected directories.

This defined the protected realm. To assign access to users:

  1. Click Services in the left-hand navigation, then click Edit FTP Users (the option might also be called Edit Mail and FTPUsers depending on the features you used).
  2. Pick an existing user, or create a new one.
  3. Open up the Other user permissions section.
  4. Select the protection realm name that you create above under Allow access to web directories and click the right arrow button to give access to this user.
  5. Click Save.

You've now password protected a directory and assigned a user to this protected area. If you want, you can go back and add more users by repeating the last four steps.


  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

Upload files to your website using an FTP Client

An excellent free open source ftp client is there are clients for...