Web Hosting Talk







View Full Version : webalizer /stats directory


hitspot
11-18-2001, 03:13 AM
I have a user who wants to be able to delete the .htaccess file in their webalizer /stats directory so they don't have to put in their username / password combo. As the directory is owned by 'nobody', it would not let them make changes to this directory.
I can obviously do this for them using admin access, but the user wants a perminant solution for future setup sites that will not require my intervention. Is there anyway I can set up the server so it will allow all users to edit their respective /stats directories?

I appreciate the help,
David Kiley

NewonNet
11-18-2001, 04:14 AM
You would need to modify webalizer script not to write the .htaccess file in the first place. I don't think this is too hard.

I think commenting out this section in webalizer2.pl should work

# Create a .htaccess if it isn't there yet
if (!-e '$thepath/.htaccess')
{
my $string = "#Access file\norder allow,deny\nallow from all\nrequire group $name\nAuthname WebStats\nAuthtype Basic";
open HTACCESS, qq(>$thepath/.htaccess);
print HTACCESS $string;
close HTACCESS;
chmod 0744, qq($thepath/.htaccess);
}


I don't think the user will be able to modify any files still since the files are owned by root.

Unliess you add to the script commands to chmod all the files in that directory to 664 so that it would be modifiable by that site group. Right now, the files are chmod to 644.

If anyone else has better ideas, please let us know..