Permission denied on /var/www/html/admin/modules

When I connect to the online repository I get "Your freePBX is Out of Date. CLICK HERE (UpdateNeeded)"
When I try and download and install I get “Warning: file_get_contents( failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/html/admin/page.modules.php on line 560
File Integrity FAILED for /var/www/html/admin/modules/_cache/fake - Aborting”

To try and fix this manually I tried to run the update scripts from /var/www/html/admin/modules but I get a “permission denied” when I try and execute any of the scripts in this directory.

When I go into module admin there is one unknown module listed as broken and the drop down to remove etc is blank.

Thanks Bubba,

This resolves the problem with downloading and installing modules (after I had removed which this reintroduced - I do search and try and find the solution before posting)
The broken module is still showing and the drop down to remove it is still blank (again I have searched for the fix for this and it was meant to have been patched some time ago in FreePBX so that broken modules could be removed)

what version freepbx does it show you are runinng?
i am thinking there is a file you can delete to correct that error.
I will when I get time…
I am working on the install steps for astrisk 1.4 beta

It shows version 2.1.2
It is a clean install of Trixbox 1.2 downloaded 3 days ago

Ok so Rob knows about the broken module error and has a fix for it coming out…

OK robMac I guess I will answer this

But please do some reading

cd /usr/src/
rm -rf freepbx
tar -zxvf freepbx-2.1.2.tar.gz
mv freepbx-2.1.2 freepbx
cd freepbx
./install_amp --force-version=2.1.1
cd …