404 on all URLs after suspend/unsuspend or restore when Jailed Shell is enabled (virtfs + RDocumentChRoot)
Hi,
I’m seeing an issue that affects only accounts which:
-
have Jailed Shell enabled, and
-
are then suspended/unsuspended or terminated and restored from backup.
Environment
-
AlmaLinux 8, WHM/cPanel 130.x
-
Apache 2.4 (EA4)
-
PHP handler: ea-php74 via PHP-FPM (per-user)
-
Example account:
multimal, main domain:multimall.am
What happens
After Suspend → Unsuspend or Terminate → Restore of this account (with Jailed Shell enabled):
-
Any URL (
/,/index.php,/test.php,/test-static.txt) returns 404. -
Files definitely exist in
/home/multimal/public_html. -
PHP-FPM pool and socket are correct.
-
There are no entries for these requests in
/etc/apache2/logs/domlogs/multimall.am. -
In Apache
error_logI see, for example:client denied by server configuration: /home/multimal/public_html, referer: https://multimall.am/
In the vhost I have the ruid2/jail block:
<IfModule ruid2_module>
RMode config
RUidGid multimal multimal
RDocumentChRoot /home/virtfs/multimal /home/multimal/public_html
</IfModule>
So Apache is trying to serve the domain from /home/virtfs/multimal.
After suspend/unsuspend or restore, this virtfs for the user seems to be in a bad state: Apache cannot access the docroot and denies the request before it even reaches PHP/FPM (404 even for a simple test-static.txt, and domlog is empty).
What actually fixes it
If I go to WHM → Account Functions → Manage Shell Access and change this user from Jailed Shell to Disabled (or Normal) shell, then:
-
the vhost is rebuilt without
RDocumentChRoot /home/virtfs/USER ...; -
after
/scripts/rebuildhttpdconfand Apache restart, all URLs start working again (static and PHP).
So in this case the real root cause is Jailed Shell / virtfs + RDocumentChRoot after suspend/unsuspend or restore.
Additional note about .htaccess
Independently, the account’s docroot .htaccess (restored from backup) also contained the standard MultiPHP handler:
<IfModule mime_module>
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
With PHP-FPM enabled this AddHandler conflicts with the FPM SetHandler and can cause 404 only for .php (static files still work).
However, in the case described above, even a plain static file was 404, so the critical issue was definitely Jailed Shell / virtfs. Disabling Jailed Shell is what made the site work again.
Question
-
Is this a known issue with Jailed Shell + mod_ruid2 (RDocumentChRoot /home/virtfs/USER) after suspend/unsuspend or terminate/restore?
-
Is there an official way to repair/rebuild virtfs for a single user so that Jailed Shell can be safely used again after these operations?
Thanks.
-
Hey there! I don't believe this is a known issue, but I couldn't reproduce this one a test server with the settings you outlined. Could you create a ticket so this can be investigated directly on the server?
0 -
Hi Rex,
can't create ticket. Our license under Contabo
0 -
You are always able to open a ticket, it just may not be directly to us.
0 -
Hi Khachatryan, are you able to post some results of how this was resolved please?
0
Please sign in to leave a comment.
Comments
4 comments