Reprinted from: http://blogs.leoworks.net/jinglecat/post/Error-Access-Denied-Activate-Office-SharePoint-Server-Publishing-Infrastructure.aspx
When publishing intrastructure is activated, Access Denied is received. This problem may be caused by the use of customProgramIf the account of the application pool is not authorized, perform the following steps:
1. Open IIS Admin.
2. Location the Web site for your WSS web application.
3. Goto to the properties and select the 'home directory' tab.
4. Change the apppool to be the same as central administration.
5. iisreset
6. Activate the publishing infrastructure feature on your site.
7. Change to apppool back to the original.
8. iisreset.
Reference: Activating Office Sharepoint Server publishing infrastructure-Access Denied
If the preceding method fails, run the stsadmin command:
C:/program files/common files/Microsoft shared/Web Server Extensions/12/bin> stsadm-O activatefeature-name publishingresources-URL http: // website