Password protecting directories



Newbie here looking for some advice.

I know I could do this with my previous hosting company using CPanel, so there must be a way with the DH Panel! :slight_smile:

For example I always used to store certain documents under the URL (where the “secure” directory would require a password to access the files). There’d only really be one password / login which I’d give to selected people to view family snaps etc…

How do I password protect directories under the DH panel?



Learning… very slowly… but it’s fun!

#2 should be what you are looking for. Good Luck! :wink:




thanks - that looks exactly like what I want to do. Just have some Q’s.

But what does the tickbox enabling “Webdav” mean?

I created a directory and secured it with two passwords, but the panel said I would “no longer own it, and cannot FTP into it, except via Webdav”. How do I upload files into this directory then?


Simon (loving DH!)

Learning… very slowly… but it’s fun!


WebDAV stands for “Web-based Distributed Authoring and Versioning” and is not something you are likely to want to use for the purposes you described in your original post.

The warning about WebDAV is only relevant if you select the WebDAV checkbox (which you should not do unless you intend to use WebDAV and are willing to live with it’s characteristics, which include you not owning the directory and the inability to use traditional ftp with it).

If you have already selected the WebDAV checkbox, just go back to the screen and “uncheck” it; for what you want to do only .htaccess protection is desired.




thanks. I did not check the box, I didn’t know what it meant! :slight_smile:

So therefore I can still FTP into the directory as usual?
… and it’s simply password protected from the outside world?

If so… thanks a million. Thats just what I want! :slight_smile:



Learning… very slowly… but it’s fun!


You are correct! Good Luck!



If you use the above described method, a person accessing this password protected subdirectory still has to know the main password and sign on as the original user first right?



If you are talking about accessing by browing to the directory from the web, no, not at all. All they have to know is the username/password you set up for the Apache authentication (.htaccess provided password protection) when you set it up.

That username/password can (and probably should!) be something different than the ftp username/password, and you can set up as many different username/password combinations as you want from the panel.

If you want them to be able to access it via ftp, then, of course, they will need the “main” username/password combination. Good Luck!



That makes sense, but I am just a beginner in all of this. The only way I’ve passed files is via ftp. How else do you do it?


What do you mean when you say “passed” files? You will need to use either ftp or a script of some type to allow uploading to that protected directory, but files can be retrieved via http with a browser by just browing to the directory (which is password protected as discussed above).

If you need for others to be able to send files to that directory, another approach is required - the original poster just wanted to have a directory where he could store files (which he would upload via ftp) for others to see if they had a password - ie. a “private” directory.

Does that help?