Results 1 to 12 of 12
  1. #1

    How to suspend user without suspendind cpanel account

    Hi,

    Anyone here know how it's possible to suspend a website on WHM in keeping the customer to use his cpanel and ftp access ?!



    Thanks

  2. #2
    Can you explain the circumstances why you need to do this? Not being noisy but help come up with an answer for you.
    █ DMB SOLUTIONS LTD
    DMB Hosting - UK Web hosting and VPS Servers
    █ All owned hardware Chicago and UK

  3. #3
    Join Date
    Jan 2011
    Posts
    160
    simple rename index.html, this will be enough to take his site down.

  4. #4
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    9,072
    1. chmod 000 public_html
    2. chown root:root public_html

    That will prevent files under public_html from being served, and prevent them from enabling it again.
    RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca

    www.HostingSecList.com - Security Notices for the Hosting Community.

  5. #5
    Join Date
    Oct 2010
    Posts
    64
    every option i could think of (including the ones mentioned above) allow the user to un-suspend themselves if they wanted.
    which brings me to daimon666's question

  6. #6
    You can disable a file or directory by changing it's permission.
    domainCart - PHP / AJAX Domain and Hosting Order Script | WHMCS Alternative
    Supports 700+ domain extensions, 27+ payment gateways, multi-currency with auto exchange..
    www.domaincart.net | Demo (all in one - without template)

  7. #7
    Join Date
    Mar 2009
    Location
    Miami, Florida
    Posts
    20,777
    Hello,
    You could try creating the following .htaccess file containing. It would cripple anything in the webroot. This however would still allow any outbound scripts to work.

    Redirect 301 / http://domain.com/cgi-sys/suspendedpage.cgi
    Keith I Myers
    KMyers.me The rantings of a lunatic
    Join me on Technical.chat

  8. #8
    Sure,

    I have a customer that his website overload my server at 600% due at a script php problem... I want allow him to fix the problem to get his website back online. I have suspended his account because if the account is active the entire server crash.. so what i can do for allow the customer to make the change of his website without see his website online.

    Thanks for your answer

  9. #9
    Join Date
    Mar 2010
    Posts
    442
    create .htaccess file and past the following code.

    single ip address access

    order deny,allow
    deny from all
    allow from 192.168.1.1


    http://www.yourdomain.com/.htaccess

    multiple ip address access

    order deny,allow
    deny from all
    allow from 192.168.1.1
    allow from 192.168.1.2
    allow from 192.168.1.3


    Authorize the ip for your client only he will be able to access site without any problem no one else.
    Build your dream otherwise someone will hire you to build their dreams.

  10. #10
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    14,135
    Quote Originally Posted by anythingss View Post
    every option i could think of (including the ones mentioned above) allow the user to un-suspend themselves if they wanted.
    No they don't (or they shouldn't).
    If you change ownership of public_html to root:root, nobody should be able to change that back.

    .htaccess files will be easily removed by the user, theoretically.

    If you want to REALLY suspend things (without suspending the account):
    Code:
    chown root:root /home/username
    chmod 000 /home/username
    This way, even if they can login (they can), they can't change anything back to themselves, or shouldn't be able to.
    Tom Whiting, WHMCS Guru extraordinaire
    Linux problems? WHMCS Problems? Give me a shout
    Check out my WHMCS Addons

  11. #11
    Join Date
    Oct 2010
    Posts
    64
    Quote Originally Posted by linux-tech View Post
    No they don't (or they shouldn't).
    If you change ownership of public_html to root:root, nobody should be able to change that back.

    .htaccess files will be easily removed by the user, theoretically.

    If you want to REALLY suspend things (without suspending the account):
    Code:
    chown root:root /home/username
    chmod 000 /home/username
    This way, even if they can login (they can), they can't change anything back to themselves, or shouldn't be able to.

    proftpd running without pam (such as the config cpanel does) allows you to do many things to override file permissions, regardless of their ownership or permissions.

    #touch testfile
    #chmod 000 testfile
    #chown root:root testfile

    ftp> Command: DELE testfile
    ftp> Response: 250 DELE command successful

    #ls testfile
    ls: cannot access testfile: No such file or directory


    edit: i think its the lack of pam that allows it to happen, not sure tho.
    Last edited by anythingss; 09-06-2011 at 09:16 PM.

  12. #12
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    14,135
    all the more reason to switch from proftpd.
    If you follow the advice about chmoding /home/user and changing ownership, the user has nowhere to login to, even with ftp programs
    Tom Whiting, WHMCS Guru extraordinaire
    Linux problems? WHMCS Problems? Give me a shout
    Check out my WHMCS Addons

Similar Threads

  1. cPanel : Suspend account w/o killing cPanel Access
    By KMyers in forum Reseller Hosting
    Replies: 9
    Last Post: 05-04-2009, 09:10 PM
  2. automatic suspend account in cpanel
    By mirheydari in forum Web Hosting
    Replies: 15
    Last Post: 07-18-2008, 03:27 AM
  3. Problem with suspend account cpanel
    By robocap in forum Hosting Security and Technology
    Replies: 1
    Last Post: 07-19-2007, 05:41 PM
  4. cPanel Suspendind an Entire Package?
    By lindmar in forum Running a Web Hosting Business
    Replies: 1
    Last Post: 12-09-2006, 12:10 PM
  5. [cpanel] Suspend account suspend email?
    By technicalws in forum Web Hosting
    Replies: 4
    Last Post: 03-25-2003, 12:27 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •