You do not have permission to access this document

A Joomla site has been working fine but is now displaying an error when trying to save new content. The error displays as “You do not have permission to access this document.”

It is an Apache Web Server error and not a Joomla error. Considering that Joomla has not changed it will be related to server changes or Apache updates.

We had made a server change to address Apache Security Headers recently. Those changes were working ok with other sites and with the public view of this Joomla site.

The .htaccess file for the Joomla website was the first thing to check. That revealed we had added some specific headers relating to those security headers back in 2021 to address an different issue.

#Added 20211201 following Joomla recommendations after upgrade to 3.10.3
<FilesMatch "\.svg$">
  <IfModule mod_headers.c>
      Header always set Content-Security-Policy "script-src 'none'"
  </IfModule>
</FilesMatch>

<IfModule mod_headers.c>
    Header always set X-Content-Type-Options "nosniff"
</IfModule>

In this case, the .htaccess site specific instructions clashed with the recently modified server instructions.
Removing the .htaccess specific commands allowed the system to process the new Articles correctly.

Conclusion

If you have an error in Joomla “You do not have permission to access this document.” for your Joomla article, it is an Apache error.

Check your .htaccess and your server configuration for potential Apache issues first.

Need help with your Joomla or WordPress site? WrenMaxwell provides support and secure website hosting services. Contact Us at any time.

Leave a Comment