Terminal showing Joomla file permission chmod commands

Joomla File Permissions: The Correct Settings Explained

Marco Vasquez

Written By
Marco Vasquez

Marcus Chen

Reviewed By
Marcus Chen

Last Updated
April 2, 2026

When we manage a Joomla site, the security and stability of the installation hinge on something as simple as the permissions we assign to files and folders. Too permissive settings can open the door to attackers, while overly restrictive ones can break updates, extensions, and even the front‑end. In this guide we walk through the fundamentals of the Unix/Linux permission model, explain why the right joomla file permissions matter, and give you practical commands and tools to audit and correct them on any hosting environment.

What Are File Permissions in Joomla?

Terminal showing Joomla file permission chmod commands

Joomla runs on a typical Unix‑like operating system, so it inherits the same permission scheme that governs every file and directory on the server. Each item has three sets of bits that control what the owner, the group, and others can do:

  • Read (r) – allows the content to be viewed.
  • Write (w) – permits modification or deletion.
  • Execute (x) – for files, this means the file can be run as a program; for directories, it allows entering the directory and accessing its contents.

These three bits are expressed in numeric notation. For example, 644 translates to rw‑r‑r‑ (owner can read/write, group and others can only read). 755 becomes rwxr-xr-x, and 777 is rwxrwxrwx. In Joomla we usually set files to 644 and directories to 755. The owner and group are typically the user under which the web server runs (e.g., www-data, apache, or a dedicated FTP user).

Why Correct Joomla File Permissions Matter

Joomla file permissions security lock concept

Improper joomla file permissions expose the site to two major problems (see also our Joomla security tips for a broader overview):

  • Security risks – a directory that is world‑writable (777) can be used by an attacker to upload a web shell, modify configuration files, or execute arbitrary code.
  • Operational failures – if a file is not writable when Joomla expects to write to it (for example during an extension install or a media upload), the operation aborts with errors such as “Could not write to configuration.php”.

Balancing these concerns means applying the least‑privilege principle: give the web server just enough rights to function, and nothing more.

How Wrong Permissions Lead to Hacks

When a directory is set to 777 or 775 with a group that includes the web server, an attacker can exploit the following vectors:

  • Directory traversal – a malicious script can locate a writable folder and place a file that the server later executes.
  • Arbitrary file upload – many Joomla extensions allow users to upload images. If the target folder is world‑writable, an attacker can replace the image with a PHP shell.
  • Web shell injection – once a PHP file resides in a writable directory, the attacker can invoke it via HTTP and gain remote code execution.

These scenarios are common in shared‑hosting environments where default permissions are left at 777 for convenience. By tightening the permissions we dramatically reduce the attack surface.

Recommended File and Directory Permissions for Joomla

The following table summarizes the settings that work for the majority of Joomla installations. Adjustments may be needed for custom setups, but this is a solid baseline.

Item Permission Reason
All PHP, HTML, CSS, JS, and image files 644 Owner can edit; web server can read.
All directories (including templates, images, logs) 755 Owner can list and modify; web server can traverse.
configuration.php 444 or 440 Read‑only for everyone; prevents tampering.
.htaccess 644 Web server needs to read; no execution required.
tmp/ and cache/ 755 Writable by the web server for temporary files.
logs/ 755 Web server writes logs; others only read.

Special Files and Their Permissions

Some files deserve extra attention:

  • configuration.php – this file contains database credentials and secret keys. Setting it to 444 (read‑only for everyone) or 440 (read‑only for owner and group) blocks any script that tries to overwrite it.
  • .htaccess – used for URL rewriting and security rules. 644 is sufficient because the server only reads it.
  • tmp/ and cache/ – these folders must be writable during updates and when extensions generate temporary data, so 755 is the safe choice.
  • logs/ – Joomla writes error and access logs here; again, 755 provides the needed write permission without exposing the folder to the world.

How to Check File Permissions in Joomla

File manager showing Joomla directory permissions

There are several ways to inspect the current permissions:

  • cPanel File Manager – right‑click a file or folder and choose “Change Permissions”. The interface shows the numeric value.
  • FTP clients (e.g., FileZilla) – the “Permissions” column displays the octal code; you can also right‑click and select “File permissions…”.
  • SSH command line – the most precise method, especially for large sites.

Using SSH Commands to Audit Permissions

Once you are logged in via SSH, the ls -la command lists permissions, owners, and groups. To find files that are too permissive, use find with the -perm flag:

# List all files that are world‑writable (777)
find /path/to/joomla -type f -perm -o+w -print

# List directories that are world‑writable
find /path/to/joomla -type d -perm -o+w -print

# Show ownership for the entire tree
find /path/to/joomla -exec ls -ld {} \; | awk '{print $3, $4, $9}'

Replace /path/to/joomla with the actual root directory of your site. The output helps you spot any anomalies before you apply fixes.

How to Fix Joomla File Permissions via SSH

Secure vs hacked server permissions comparison

After identifying problematic items, you can correct them with a couple of find + chmod pipelines. The following commands set the standard 644 for files and 755 for directories throughout the Joomla installation:

# Set all files to 644
find /path/to/joomla -type f -exec chmod 644 {} \;

# Set all directories to 755
find /path/to/joomla -type d -exec chmod 755 {} \;

If the ownership is incorrect (for example, the files belong to root instead of the web‑server user), you can adjust it with chown:

# Replace www-data with the appropriate user/group for your server
chown -R www-data:www-data /path/to/joomla

Running these commands as the root user or a sudo‑enabled account ensures that the changes apply to every item, including hidden files like .htaccess.

Using Admin Tools to Fix Permissions Automatically

For administrators who prefer a graphical approach, the free Akeeba Admin Tools component includes a “Fix Permissions” feature. After installing the extension, work through to Components → Admin Tools → Fix Permissions. The tool scans the site, displays any mismatches, and applies the recommended 644/755 settings with a single click. You can also define custom rules for specific folders (e.g., keep tmp/ at 775 if your host requires it).

Common Permission Errors and How to Solve Them

Even with the correct defaults, you may encounter error messages that point to permission problems. Below are the most frequent symptoms and their remedies.

  • 500 Internal Server Error – often caused by a mis‑set .htaccess file (learn more in our Joomla .htaccess guide) (e.g., 777). Reset it to 644 and verify that the Apache AllowOverride directive is enabled.
  • Blank page after an update – indicates that Joomla could not write to the tmp/ folder. Ensure tmp/ is 755 and owned by the web‑server user.
  • “Could not write to configuration.php” – the file is either read‑only for the web server or owned by a different user. Change the owner to the web‑server user and set the permission to 440 (if you want it read‑only) or 644 (if Joomla needs to update it during upgrades).
  • Failed extension install – the installer writes to administrator/components/ and components/. Verify those directories are 755 and writable by the web server.
  • Media upload failures – the images/ folder must be writable. Set it to 755 (or 775 if your host uses a shared group) and confirm ownership.

Joomla File Permissions on Different Hosting Types

cPanel file permissions for Joomla

Hosting environments differ in how they handle user accounts and web‑server processes. Understanding these differences helps you choose the right permission set.

  • Shared hosting (suPHP/CGI) – the PHP process runs under your FTP user, not the global web‑server user. In this case 755 for directories and 644 for files still work, but you must ensure the owner is your FTP account.
  • Shared hosting (mod_php) – PHP runs as the Apache user (e.g., www-data). Files should be owned by www-data and set to 644/755. Avoid 777 at all costs.
  • VPS / Dedicated server – you have full control over users and groups. Create a dedicated user for Joomla (e.g., joomla) and add the web‑server user to the same group. Then set chmod 664 for files and chmod 775 for directories if you prefer group write access.
  • Managed Joomla hosting (see our best Joomla hosting picks) – providers often lock down permissions for you. Check the documentation; some platforms require 775 for tmp/ and logs/ to allow internal scripts to write.
  • Cloud platforms (e.g., AWS, Azure, or when optimizing Joomla for speed) – when using containers or serverless functions, the user inside the container is usually www-data. Apply the same 644/755 rules and verify that the Dockerfile does not override them.

Frequently Asked Questions

1. Do I need to set 777 for any Joomla folder?

No. The only time 777 is ever justified is in a temporary troubleshooting scenario on a development server. For production sites you should always use 755 for directories and 644 for files, with the exception of tmp/ and cache/ which also stay at 755.

2. How often should I audit Joomla file permissions?

We recommend a quarterly audit, or after any major change such as a core update, extension install, or migration to a new host. Automated tools like Admin Tools can run the check on a schedule.

3. My site uses a custom uploads/ directory for user‑generated content. What permission should it have?

Set the directory to 755 and ensure it is owned by the web‑server user. If users need to write files directly, 775 with a shared group can also work, but avoid 777.

4. Can I use chmod 600 for configuration.php?

Yes, 600 (owner read/write only) is even more restrictive than 440. Just make sure the owner is the user that the PHP process runs under; otherwise Joomla will be unable to read the file.

5. What should I do if I’m on a shared host that forces 755 on all files?

In that case you can’t tighten file permissions further, but you should still ensure that no directory is set to 777. Use chmod 755 for directories and verify ownership. If the host allows it, set configuration.php to 644 or 440 for additional protection.

Maintaining the correct joomla file permissions is one of the simplest yet most effective ways to keep a Joomla site secure and running smoothly. By understanding the underlying Unix permission model, applying the recommended 644/755 defaults, and using the tools and commands outlined above, we can prevent common security breaches and avoid costly downtime. Regular audits and awareness of hosting‑specific nuances ensure that the permissions stay aligned with best practices, giving us confidence that our Joomla installations remain both fast and safe.

Marco Vasquez

Written By

Marco Vasquez

Developer Relations

Marco is a full-stack developer and Joomla contributor with deep expertise in template development, module creation, and Joomla 5 architecture. He translates complex technical concepts into clear, actionable tutorials that developers at every level can follow.


Last Updated: April 2, 2026

🇬🇧 English | 🇸🇪 Svenska | 🇫🇮 Suomi | 🇫🇷 Français