Fix open() Critical Error : 13: Permission denied – Upload Images Error in WordPress

WordPress It is a very flexible system, which allows users to create very rapir from a simple blog to an advanced presentation website or an online store.
Like any system, however, it is not without problems. Mostly, Web Hosting offers They are optimized either for a small number of users or not configured according to the needs of users. For an advanced website created on WordPress we recommend to use dedicated servers with services configured especially for WordPress.

One of the most common errors on a blog / website created with WordPress, is the impossibility of upload media files. HTTP Error. If you have an activated one “error.log” On the server, when you try to upload an image, the error will look like this:

"date" [crit] 16324#16324: *119467 open() "/home/path/public_html/" failed (13: Permission denied), client: IP, server: website.com, request: "GET / HTTP/1.1", host: "website.com"

This error is found not only when trying to upload a media file on the server, but also when the website is accessed by users, and on the web page there are scripts that do not have permission on the server to be open. Therefore, this error is related to the permits and folders on the host server. “chmod” and “Chown“.

How to solve the error: Open () Critical Error: 13: Permitization deed

1. First of all we have to have access FTP or SSH to the server. We connect and navigate to the directory where we find the folder in which the website files are. In our example this is: “public_html”.

2. If we use an SSH connection, in the directory in which we reached point 1 we execute the command lines:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

chown -R user:group *
The first order line will look for All files located in the current and recursive folder, and will set permission 644. The second command line will do the same, but only for the directors. The permission will set them 755.
In the third order line, the user and the group from which the files belong. Most of the time this is of the form: “apache:nobody” For web servers with httpd / apache or “nginx:nginx” for nginx servers.

After the execution of these command lines, the error “open() Critical Error : 13: Permission denied” should disappear. If you have questions or questions, do not hesitate to leave them in the comments.

Passionate about technology, I write with pleasure on stealthsetts.com starting with 2006. I have a rich experience in operating systems: Macos, Windows and Linux, but also in programming languages ​​and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, Presashop).

Home Your source of IT tutorials, useful tips and news. Fix open() Critical Error : 13: Permission denied – Upload Images Error in WordPress

1 thought on “Fix open() Critical Error : 13: Permission denied – Upload Images Error in WordPress”

Leave a Comment