If you get error denied while activating this feature, you have not activated the dependent feature called “PublishingResources”.
Activate the “PublishingResources” feature using stsadm command
stsadm -o activatefeature -name PublishingResources -url http://YOUR_WEBSITE
(change the URL)
Now, Activate the Office SharePoint Server Publishing Infrastructure feature.