I get the error when I attempt to remove protection from a directory.
I set up a protected directory on a whole website (http://114.111.133.226/). I think I may have broken the protection by uploading a different .htaccess file to the root public_html folder (its no longer protected so I've presumably done something to break it).
I can't remove the ineffective 'protection' because I get an error:
Failed to remove protection : flush_file_lines called on non-loaded file /home/animalhealthstore/public_html/.htaccess at ../web-lib-funcs.pl line 1331.
I'm not to worried about the protection - its just an "under construction" barrier while I finish setting the site up but I need to clean this site up and get the linked site http://114.111.133.227/ working again (that one is now reporting "No input file specified." which I believe is related to this problem since it was working fine before I tried putting the protection on (which also worked initially).
How do I find a way to dig in and fix this?
Comments
Submitted by whippy on Wed, 10/20/2010 - 04:04 Comment #1
Scratching around for a solution I've noticed that the Server API entry on PHPInfo has changed. I'm pretty sure it used to read Apache 2.0 Handler but now it reads "CGI/FastCGI".
I added "SSL Website enabled?" (required) and"IP-based virtual FTP enabled?" (at whim) to the servers under Enabled Features under Edit Virtual Server. Putting these back does not seem to make a difference though.
Submitted by JamieCameron on Wed, 10/20/2010 - 12:18 Comment #2
This sounds like a virtualmin bug ..
Can you try editing the file
/etc/webmin/config
and adding the lineerror_stack=1
, then re-trying removing the protection and posting the full error message here?Submitted by whippy on Wed, 10/20/2010 - 17:14 Comment #3
Thanks Jamie. This bug appeared at the same time as the issue I'm discussing in [url]https://www.virtualmin.com/node/15960[/url]. I don't know if its related but I am guessing that it is now that I can see the error stack. I'll leave that setting on!
Here is the full error:
Submitted by JamieCameron on Wed, 10/20/2010 - 19:16 Comment #4
Ok, looks like this can happen if the .htaccess file in that directory is almost empty.
The work-around is to edit it and add the line :
require valid-user
and then re-try deleting it.
I will fix this properly in the next release of the Protected Web Directories plugin.
Submitted by Locutus on Wed, 10/20/2010 - 19:55 Comment #5
I might have a follow-up minor issue concerning this one.
When creating a new domain, the template setting "Password-protect Webalizer stats" apparently dictates whether an .htaccess gets created in the public_html/stats directory.
In the Protected directories module, when I click "Find protected directories", it will pick up the stats one and add it. While this is just a minor thing, it seems a little odd that the stats dir was not added to the protected directories list there in the first place, and needs to be picked up by clicking Find.
I'm not sure if adding and manipulating the stats directory's protection there can lead to problems - If not, it might be nice to have it added to the directories list automatically when the domain gets created with "Protect Webalizer" turned on.
Submitted by JamieCameron on Wed, 10/20/2010 - 23:08 Comment #6
Good idea .. I will make it so that directory shows up by default.
Submitted by whippy on Thu, 10/21/2010 - 17:24 Comment #7
Thanks.
The 'require valid-user' line in .htaccess fixes the problem and allows the 'protection' to be removed.
FYI the .htaccess file was pretty big and the directory was well populated (a full Magento installation).
Ideally this type of directory protection should not modify the user's .htaccess files - they can always change those out from under the administration system. I don't recall the .htaccess file being affected when I protected directories using plesk or cpanel so I'm pretty sure this is possible.
Submitted by Issues on Fri, 11/05/2010 - 20:21 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.