cancel
Showing results for 
Search instead for 
Did you mean: 

How to password a web folders ?

AmpneyFrank
Newbie
Posts: 3
Registered: ‎31-07-2007

How to password a web folders ?

I have tried many many times to password web folders on my Force9 account but can’t get it to work at all.  It used to work very well but I’ve not been able to use it since PlusNet became involved.
I’m using Microsoft Notepad to create the files, and either Windows Explorer or CuteFTP to transfer them.  Yes, I think I am meticulously following the instructions on the Help Pages.
Any ideas anyone ?  Has anyone used it recently on F9 ?
20 REPLIES 20
Prod_Man
Grafter
Posts: 286
Registered: ‎04-08-2007

Re: How to password a web folders ?

I'm not certaion on this one.
I am not a huge user of htaccess but,
I gather that permissions are crucial for them to even work, wrong permissions and they wont pick up.
(I maybe wrong)
Humour me and check (this may sound really stupid):
1. I myself cannot create .htaccess files locally due to FS constraints on Windows,
so I assume you are altering the name once uploaded. Make sure the prefix '.' is in there else it wont be picked up by Apache.
2. if they need to be chmoded to 777 or something, just so that the separate Apache User cant argue at all.
although 644 (usually default permissions) should be fine as all Read Permissions are granted 😕
Sorry if none of that helps.
Jim,
AmpneyFrank
Newbie
Posts: 3
Registered: ‎31-07-2007

Re: How to password a web folders ?

Thanks for your reply Jim.
Yes, I am uploading htaccess.txt then changing it to .htacces
At the same time I change the properties to (Owner) read/write/execute , and all others just read.
The same with the password file.  Sadly it just doesn't seem to work.
Anyone else tried this recently ?
Peter_Vaughan
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: How to password a web folders ?

Does http://usertools.plus.net/tutorials/id/5 help?
Can you post your .htaccess file and also say what directory it is in.
The path to the .htpasswd file you use should match what the pwd command gives you on the command line.
Walter
Rising Star
Posts: 80
Thanks: 10
Registered: ‎28-06-2007

Re: How to password a web folders ?

Yes I'm having the same trouble, the protection did not work. I'll need to go over the guide again.
I can see and read the '.' files OK.  Just install  'Ext2IFS_1_11.exe' which I use to read my linux partitions.
Strat
Moderator
Moderator
Posts: 30,345
Thanks: 3,314
Fixes: 505
Registered: ‎14-04-2007

Re: How to password a web folders ?

I had numerous attempts until I got it right. Everything in .htaccess has to be precise and correct.
The guides do assume a little prior knowledge. With me it was trial and error until it worked Sad

Customer and Forum Moderator. Windows 10 Firefox 87.0 (64-bit)

madjbright
Grafter
Posts: 184
Thanks: 2
Registered: ‎09-06-2007

Re: How to password a web folders ?

I had tried this using the help on plusnet, and then used a few other sites as well, and finally got it to work.
this is what I have set:
[quote=.htaccess]
AuthUserFile /share/isp/**1**/www/**2**/**3**/htdocs/**4**/.htpasswd
AuthName "Please log on"
AuthType Basic
require valid-user
Where:
**1** = "Plusnet" "Force9" or "freeonline"
**2** = The first two letters of your username
**3** = The whole of your username
**4** = The directory which you want to password protect. This must be everything after www.username.co.uk/

[quote=.htpasswd]
**1**:**2**
**3**:**4**
Where:
**1** = username 1
**2** = encrypted password 1
**3** = username 2
**4** = encrypted password 2
I encrypted passwords using http://usertools.plus.net/htpasswd/index.php, which is the plusnet version.
Just type your username and password in, and click submit.
Do it until you have all your usernames and passwords and then click submit again with the fields empty, and you will get the exact text you need to put into .htpassword.

I then transferred both htaccess.txt and htpassword.txt using windows explorer, into the directory which is shown in .htaccess. You have to put the two files into the directory which you want to password protect.#
The two files should now disappear, as they have been hidden.
To use Windows Explorer to transfer things to your website, just type ftp:// and then your url (ie. ftp://www.username.co.uk) into the bar at the top, and it will ask you for your login password for plusnet. I find this is the easiest way for me to transfer as it works in the same way as windows explorer normally works, and there isn't any complicated details which you need to look at.

Hopefully this will be of some help to you.
Walter
Rising Star
Posts: 80
Thanks: 10
Registered: ‎28-06-2007

Re: How to password a web folders ?

Thanks for that procedure 'madjbright' 
I've messsed up the '.' files and locked myself out of the www. access. 
Can you suggest how I can view, edit or delete the .htaccess and .htpasswd using IE7 ftp  so I could try again?  ftp access is OK but they are hidden (or reconfigured)
Peter_Vaughan
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: How to password a web folders ?

I don't know how to enable hidden files in IE7 FTP...
Just use the dos ftp
ftp ftp.plus.net
<enter username & password>
ftp> cd htdocs/yourdirectory
ftp> del .htaccess
madjbright
Grafter
Posts: 184
Thanks: 2
Registered: ‎09-06-2007

Re: How to password a web folders ?

You can view the files in your web browser by going to to page you copied them to in FTP mode (ftp://....) and typing in "/.htaccess" and "/.htpasswd" in the address bar. (ie ftp://www.username.co.uk/location/.htaccess)
To replace them, just upload the correct form, and replace in the same way as you would in windows explorer.
Walter
Rising Star
Posts: 80
Thanks: 10
Registered: ‎28-06-2007

Re: How to password a web folders ?

Thanks again,  the browser would not show '.' files while in ftp mode so I eventually used the  cmd ' dir -a ' and could see and hence delete these files.  A small step in the right direction I still cannot access the www.username.plus.com even though I renamed the index.html file, the permissions are set for anyone to read.  So I am waiting for the server to catch up or flush out, if that is necessary so I or anyone can see my online files.
madjbright
Grafter
Posts: 184
Thanks: 2
Registered: ‎09-06-2007

Re: How to password a web folders ?

Would it not be www.username.plus.net, unless you have a personalised url?
If it still doesn't work, if you post the text you have for .htaccess in the forum, I can check if you have it all correct.
Walter
Rising Star
Posts: 80
Thanks: 10
Registered: ‎28-06-2007

Re: How to password a web folders ?

David, I used www.username.plus.com, but yesterday I successfully removed '.htaccess & .htpasswd using Dos cmd from the folders so I could start from scratch.  I renamed the index.html so I could get at the folders direct.  I can see the folders in ftp but not www,  where I  get 403 forbidden using different browsers.
madjbright
Grafter
Posts: 184
Thanks: 2
Registered: ‎09-06-2007

Re: How to password a web folders ?

You can't see the files .htaccess and .htpasswd in www, as they are hidden.
What is the text in your .htaccess file?
Walter
Rising Star
Posts: 80
Thanks: 10
Registered: ‎28-06-2007

Re: How to password a web folders ?

I have deleted both files as they were not 100%.  I cant see other files in www. ; which I have uploaded to htdocs.  I'll try the security set up again when I can get www access my space and  these files.