Ezilon.com - Target Your Audience, be Seen in Your Region

Password Protect Directories without access cpanel

They have: 3 posts

Joined: Mar 2008

Hi All,

I would like to have a third party create usernames/passwords for directories on a website, but I do not want the third party to have access to cpanel. My research has not been fruitful. Does anybody have any ideas?
Thanks,

Norton

JeevesBond's picture
Moderator

He has: 3,441 posts

Joined: Jun 2002

Tricky. To answer this we'll need to know a little more about what you're trying to do. Is this a directory of miscellaneous files, or some Web pages? How are these third parties accessing the site, over HTTP (using a Web browser) or FTP?

Secondly, you want third parties to be able to create usernames/passwords themselves. I'd normally suggest using .htaccess, but that would probably be too difficult for these third parties.

Welcome to the forums! Smiling

a Padded Cell our articles site!

They have: 3 posts

Joined: Mar 2008

Hi Jeeves,

Thanks for the reply. My first post was a bit unclear. I manually grant access to people (readers) for specific directories, I use cpanel to create a username and password for each person and then email them the username and password manually. Instead of setting up the usernames and passwords myself, I want someone else (i.e., my daughter) to do it forme. I would give her the list of directories, usernames, and passwords, and she would manually set them up. However, I don't want her to have access to my cpanel because I don't trust her not to blow my site up when I'm not looking. I hope that is clearer and thanks again for the reply.

Norton

JeevesBond's picture
Moderator

He has: 3,441 posts

Joined: Jun 2002

That helps, but what's inside the directories? If you just need to show a directory listing, then create a PHP script that will show the directory contents.

The next thing to do is make your PHP script only show the directory listing if the user enters a username and password that's in a database. This is somewhat insecure, in that someone with a password could give others direct links to the files in the directories, up to you if that's a concern or not.

If the contents of the directories are Web pages you should probably bite the bullet and use a CMS. There are plenty of Free ones out there (free as in beer and freedom), personally I recommend Drupal. But you should try-out a few before making a decision. Smiling

Tell us where you need further help and we can get into specifics.

a Padded Cell our articles site!

They have: 3 posts

Joined: Mar 2008

Thanks Jeeves. I will look into Drupal and other CMSs. I appreciate your help and will let you know how I decide to go.