Account suspension and htaccess
Previously, upon suspending an account, WHM would replace an account's .htaccess file in order to "suspend" the account's website. This is no longer happening on any of the 6 cpanel/WHM servers I manage with versions ranging from 11.44.1 (and maybe even before this upgrade) to 11.46.1.
Here is the output from the WHM web interface:
Suspension of ticket15780test.com
Changing Shell to /bin/false...Changing shell for kylet1.
Warning: "/bin/false" is not listed in /etc/shells.
Shell changed.
Done
Locking Password...Locking password for user kylet1.
passwd: Success
Done
1Suspending mysql users
No filesystems with quota detected.
Suspending websites...
No filesystems with quota detected.
Suspending FTP accounts...
Updating FTP passwords for kylet1
FTP password files updated.
FTP vhost passwords synced
kylet1's account has been suspended
This is the relevant /usr/local/cpanel/logs/error_log text:
[2014-12-17 10:05:37 -0600] warn [suspendmysqlusers] kylet1 has no databases. at /usr/local/cpanel/scripts/suspendmysqlusers line 29
[2014-12-17 10:05:37 -0600] info [suspendacct] suspendacct Notification => systems@[redacted].com via EMAIL [level => 3]
[2014-12-17 10:05:37 -0600] info [suspendacct] Quotas are not enabled
When I look at the List Suspended Accounts page it shows the account as suspended but says "Locked: No"
I'm going to look through the change logs now for any mention of this locking mechanism, but I haven't seen any reference to it in any WHM options.
This is the folder where the .htaccess would be written:
drwxr-x--- 7 kylet1 nobody 4096 Dec 17 10:02 public_html/
I've tried suspending with an .htaccess file in place already, and also without.
-
Here's mine on a server running CURRENT (11.46.1 3) Changing Shell to /bin/false...Changing shell for username. Warning: "/bin/false" is not listed in /etc/shells. Shell changed. Done Locking Password...Locking password for user username. passwd: Success Done 1Suspending webdav users Suspending email account logins for domain.com .... Done Suspending mysql users Using Universal Quota Support (quota=0) Suspending websites... Using Universal Quota Support (quota=614400) Suspending FTP accounts... Updating FTP passwords for username FTP password files updated. FTP vhost passwords synced username's account has been suspended
htaccess is empty, untouched. No unexpected output in error log that you mention.0 -
]Here's mine on a server running CURRENT (11.46.1 3)
Changing Shell to /bin/false...Changing shell for username. Warning: "/bin/false" is not listed in /etc/shells. Shell changed. Done Locking Password...Locking password for user username. passwd: Success Done 1Suspending webdav users Suspending email account logins for domain.com .... Done Suspending mysql users Using Universal Quota Support (quota=0) Suspending websites... Using Universal Quota Support (quota=614400) Suspending FTP accounts... Updating FTP passwords for username FTP password files updated. FTP vhost passwords synced username's account has been suspended
htaccess is empty, untouched. No unexpected output in error log that you mention.
The expected behavior is for the .htaccess file to not be empty, but instead redirect to the suspend page. Correct? When I suspend an account, their site is still accessible.0 -
The site redirected to the suspended page just fine for me. Please open a ticket to cPanel Technical Support concerning the issue you're having here. If you wouldn't mind, post back the ticket ID here. Thanks! 0 -
]The site redirected to the suspended page just fine for me. Please open a ticket to cPanel Technical Support concerning the issue you're having here. If you wouldn't mind, post back the ticket ID here. Thanks!
How does cPanel/WHM handle the redirects for suspended accounts now?0 -
]How does cPanel/WHM handle the redirects for suspended accounts now?
I traced the suspension process through the /scripts/suspendacct script and fixed the issue on one of my servers. I may have found a bug, will test with my other servers and update or submit a bug report as needed.0 -
Hello, Do you have a customer Apache template in /var/cpanel/templates/apachen_n? For main.local? If so that would explain that as custom templates would not have been updated with the change. 0 -
I should note that I was able to add the line manually and run the distiller to apply/keep the changes, and account suspensions are now working properly. ]Hello, Do you have a customer Apache template in /var/cpanel/templates/apachen_n? For main.local? If so that would explain that as custom templates would not have been updated with the change.
ls -la /var/cpanel/templates/ total 36 drwxr-xr-x 7 root root 4096 Oct 9 04:26 ./ drwxr-xr-x 92 root root 12288 Dec 30 12:25 ../ drwxr-xr-x 2 root root 4096 Oct 4 07:25 apache1/ lrwxrwxrwx 1 root root 29 Oct 4 07:25 apache1_3 -> /var/cpanel/templates/apache1/ drwxr-xr-x 2 root root 4096 Oct 4 07:25 apache2/ lrwxrwxrwx 1 root root 29 Oct 4 07:25 apache2_0 -> /var/cpanel/templates/apache2/ lrwxrwxrwx 1 root root 29 Oct 4 07:25 apache2_2 -> /var/cpanel/templates/apache2/ drwxr-xr-x 2 root root 4096 Oct 4 07:25 apache2_4/ drwxr-xr-x 2 root root 4096 Oct 9 04:26 dovecot1.1/ drwxr-xr-x 2 root root 4096 Nov 13 2012 dovecot1.2/
This is what I see in the directories listed there:ls -la /var/cpanel/templates/*/ /var/cpanel/templates/apache1/: total 8 drwxr-xr-x 2 root root 4096 Oct 4 07:25 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ /var/cpanel/templates/apache1_3/: total 8 drwxr-xr-x 2 root root 4096 Oct 4 07:25 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ /var/cpanel/templates/apache2/: total 48 drwxr-xr-x 2 root root 4096 Oct 4 07:25 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ -rw-r--r-- 1 root root 21085 Oct 4 07:25 main.default -rw-r--r-- 1 root root 6761 Oct 4 07:25 ssl_vhost.default -rw-r--r-- 1 root root 6125 Oct 4 07:25 vhost.default /var/cpanel/templates/apache2_0/: total 48 drwxr-xr-x 2 root root 4096 Oct 4 07:25 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ -rw-r--r-- 1 root root 21085 Oct 4 07:25 main.default -rw-r--r-- 1 root root 6761 Oct 4 07:25 ssl_vhost.default -rw-r--r-- 1 root root 6125 Oct 4 07:25 vhost.default /var/cpanel/templates/apache2_2/: total 48 drwxr-xr-x 2 root root 4096 Oct 4 07:25 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ -rw-r--r-- 1 root root 21085 Oct 4 07:25 main.default -rw-r--r-- 1 root root 6761 Oct 4 07:25 ssl_vhost.default -rw-r--r-- 1 root root 6125 Oct 4 07:25 vhost.default /var/cpanel/templates/apache2_4/: total 8 drwxr-xr-x 2 root root 4096 Oct 4 07:25 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ /var/cpanel/templates/dovecot1.1/: total 48 drwxr-xr-x 2 root root 4096 Oct 9 04:26 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ -rw-r--r-- 1 root root 40098 Oct 9 04:26 main.default /var/cpanel/templates/dovecot1.2/: total 52 drwxr-xr-x 2 root root 4096 Nov 13 2012 ./ drwxr-xr-x 7 root root 4096 Oct 9 04:26 ../ -rw-r--r-- 1 root root 42637 Nov 13 2012 main.default
Running Apache 2.2.220
Please sign in to leave a comment.
Comments
9 comments