PDA

View Full Version : .htacces help


babyblue
12-02-2002, 07:10 PM
Hi,

I wrote a script to create html pages for me + put them in folder "/lyrics". The problem is that the server said that there is no "w" access to this folder.

So, I created a .htpasswd and a .htaccess files:

AuthUserFile /somedir/.htpasswd
AuthGroupFile /dev/null
AuthName myusername
AuthType Basic
<Limit POST>
require valid-user myusername
</Limit>

and put this .htaccess in "lyrics", but it doesn't seem to work. I want to be the only person to create files, and others to view these files. What should I do to make it work? I don't have telnet or ssh access to my site, so I created .htpasswd locally and ftp it to my site.

The script to create html files is in a protected folder.

Please help. I'm all new at this!

Thanx.

babyblue

Spookster
12-02-2002, 07:17 PM
Well .htaccess is not really what you are looking for here. What you need to do is what is called CHMOD. CHMOD is what allows you to change the permissions on files/directories to allow read/write operations. Depending on your webhost you can either login to your account via TELNET or SSH and use the CHMOD command there or if your host provides that feature via a web based control panel then you can do it that way.

babyblue
12-02-2002, 07:30 PM
my "lyrics" folder is set to 755. Are you saying that I have to chmod it to 757? Doesn't that mean that others can write to that folder as well?

I did create an .htaccess file:

AuthUserFile /somedir/.htpasswd
AuthGroupFile /dev/null
AuthName myusername
AuthType Basic
<Limit POST>
require valid-user myusername
</Limit>

in my .htpasswd, I have:

myusername: encrypted password

And I put this .htpasswd in "somedir". But it doesn't seem to work