# Apache doesn't have write permissions any more

**URL:** <https://forum.hestiacp.com/t/apache-doesnt-have-write-permissions-any-more/22537>\
**Category:** Uncategorized\
**Created:** [November 26, 2026, 3:34pm UTC](https://forum.hestiacp.com/t/apache-doesnt-have-write-permissions-any-more/22537 "2026-11-26T15:34:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewnewby](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/a/bcef8e/32.png) [@andrewnewby](https://forum.hestiacp.com/u/andrewnewby)\
**Post date:** [November 26, 2026, 3:34pm UTC](https://forum.hestiacp.com/t/apache-doesnt-have-write-permissions-any-more/22537/1 "2026-11-26T15:34:50Z")

</div>

Hi,

As of last night, one of our servers doesn’t seem to be able to write files anymore:

> Unable to open /home/japan/web/x.com/cgi-bin/news/admin/backup/BACKUP for writing: Read-only file system at nph-build.cgi line 335.

> drwxrwxr-x 2 japan japan 4.0K Nov 26 15:23 backup
> 
> ls -ls  
> total 67832  
> 67832 -rw-rw-r-- 1 japan japan 69456534 Nov 26 15:32 BACKUP

Is there anything in Apache that could cause this? Here is the apache config:

```auto
#=========================================================================#

# Default Web Domain Template #

# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #

# 
      #

#=========================================================================#

<VirtualHost 139.162.106.5:8443>

    ServerName x.com

    ServerAlias www.x.com

    ServerAdmin info@x.com

    DocumentRoot /home/japan/web/x.com/public_html

    ScriptAlias /cgi-bin/ /home/japan/web/x.com/cgi-bin/

    Alias /vstats/ /home/japan/web/x.com/stats/

    Alias /error/ /home/japan/web/x.com/document_errors/

    SuexecUserGroup japan japan

    CustomLog /var/log/apache2/domains/x.com.bytes bytes

    CustomLog /var/log/apache2/domains/x.com.log combined

    ErrorLog /var/log/apache2/domains/x.com.error.log

    <Directory /home/japan/web/x.com/stats>

        AllowOverride All

    </Directory>

    <Directory /home/japan/web/x.com/public_html>

        AllowOverride All

        SSLRequireSSL

        Options +Includes -Indexes +ExecCGI

    </Directory>

    <Directory "/home/japan/web/x.com/cgi-bin">

        AllowOverride AuthConfig

        Options +ExecCGI -Indexes

        Require all granted

    </Directory>    

    SSLEngine on

    SSLVerifyClient none

    SSLCertificateFile /home/japan/conf/web/x.com/ssl/x.com.crt

    SSLCertificateKeyFile /home/japan/conf/web/x.com/ssl/x.com.key

    SSLCertificateChainFile /home/japan/conf/web/x.com/ssl/x.com.ca

    <FilesMatch \.php$>

        SetHandler "proxy:unix:/run/php/php8.4-fpm-x.com.sock|fcgi://localhost"

    </FilesMatch>

    SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

    IncludeOptional /home/japan/conf/web/x.com/apache2.ssl.conf_*

    IncludeOptional /etc/apache2/conf.d/*.inc

</VirtualHost>

```

---

<div class="post-metadata">

**Author:** ![andrewnewby](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/a/bcef8e/32.png) [@andrewnewby](https://forum.hestiacp.com/u/andrewnewby)\
**Post date:** [November 26, 2026, 4:04pm UTC](https://forum.hestiacp.com/t/apache-doesnt-have-write-permissions-any-more/22537/2 "2026-11-26T16:04:08Z")

</div>

The only way I can get it working is by doing:

```auto
mkdir -p /etc/systemd/system/apache2.service.d
printf '%s\n' '[Service]' 'ProtectHome=false' \
  > /etc/systemd/system/apache2.service.d/zz-local-protect-home.conf
systemctl daemon-reload
systemctl show apache2 -p ProtectHome

```

But thats really dirty - and I don’t like it. Something must have changed somewhere thats broken this, as it was working about 9 hours ago, before the last update 😕

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [November 26, 2026, 5:16pm UTC](https://forum.hestiacp.com/t/apache-doesnt-have-write-permissions-any-more/22537/3 "2026-11-26T17:16:08Z")

</div>

> [@andrewnewby](#):
>
> Something must have changed somewhere thats broken this, as it was working about 9 hours ago, before the last update

Apache2 has been updated so I suppose the systemd service conf have changed (at least on Ubuntu).

```ini
❯ systemctl cat apache2 --no-pager
# /usr/lib/systemd/system/apache2.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=https://httpd.apache.org/docs/2.4/

[Service]
Type=notify
Environment=APACHE_STARTED_BY_SYSTEMD=true
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl graceful-stop
ExecReload=/usr/sbin/apachectl graceful
# Send SIGWINCH for graceful stop
KillSignal=SIGWINCH
KillMode=mixed
PrivateTmp=true
Restart=on-abnormal
OOMPolicy=continue
RemoveIPC=yes

DevicePolicy=closed
KeyringMode=private
LockPersonality=yes
MemoryDenyWriteExecute=yes
PrivateDevices=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=read-only
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=full
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
ProtectProc=invisible
ProcSubset=pid

ReadWritePaths=-/var/log/apache2
ReadWritePaths=-/var/cache/apache2/mod_cache_disk

InaccessiblePaths=/boot
InaccessiblePaths=/root
InaccessiblePaths=-/etc/sudoers
InaccessiblePaths=-/etc/sudoers.d
InaccessiblePaths=-/etc/ssh
InaccessiblePaths=-/etc/apt
InaccessiblePaths=-/etc/.git
InaccessiblePaths=-/etc/.svn

[Install]
WantedBy=multi-user.target

```

Show the output of these commands:

```auto
dpkg -l | grep 'apache2 '
systemctl cat apache2 --no-pager

```

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [November 26, 2026, 5:22pm UTC](https://forum.hestiacp.com/t/apache-doesnt-have-write-permissions-any-more/22537/4 "2026-11-26T17:22:55Z")

</div>

> [@andrewnewby](#):
>
> But thats really dirty - and I don’t like it.

Why? Adding the override is the way to go, so Apache2 works as it was working before the update.
