.htaccess - deny from all

J@ck

New member
Joined
Apr 22, 2004
Messages
3
Usermode problem.

I had installed a protected image directory with a .htaccess file within it 'deny from all' and was succefully parsing images out of this directory on my pages by fopen command with php.

After recode'ing and stuff i want to remove this directory but isn't possible.

Tried with filemanager there is no possibility to change permissions, text in files or to delete de .htaccess. It's like apache has taken over because UID is apache instead of account name

Is this a Directadmin bug ? any one has this problem before.
 
Files created with php have different user id and you should chmod it from php script so you could access it from file manager or from ftp.

Run something like this in that directory:
Code:
<?php
$res = opendir('./');
while(($file = readdir($res)) !== false)
{
 @chmod($file, 0777);
}
closedir($res);
?>
Then you can delete files with ftp or with file manager.
 
thnx for the quick reply. problem is no ftp possibilities anymore because of the deny from all .htaccess.

Think i'm gonna contact the hosting company (it's eassier :) ), or uploading the file the same way i did it with the photo's. With the last option i've to modify the script just a little bit and i've to rebuilt my script. That's gonna take a little time. Let you know if it worked.
 
Here is the last result. I contacted my hosting company because i couldn't get writing access to that specific directory also. When a php script is uploading files for instance pictures the UID is taken over by apache even so the control of that directory or specific files uploaded. So maybe an server config problem.
 
That's normal configuration. That's why you should chmod files and directories when creating it with php so you can access it without php.
 
Back
Top