The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Disable cpanel/ssh/ftp/account changes without suspending

Discussion in 'General Discussion' started by erinspice, Oct 29, 2008.

  1. erinspice

    erinspice Well-Known Member

    Joined:
    Feb 12, 2006
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    I'm in the process of transferring accounts between servers. How can I disable changes to accounts on the old server without suspending the accounts? I want the websites to be served, but I don't want users to be able to upload new files, edit files, or change configurations. I can't shut these services down on a system level, though, because I need to be able to log in myself.
     
  2. JPC-Stefan

    JPC-Stefan Member

    Joined:
    Oct 29, 2008
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Here is simple command to make user accounts read-only.

    # chattr +i userfolder

    After that user will not be able to do any modifications.
     
  3. erinspice

    erinspice Well-Known Member

    Joined:
    Feb 12, 2006
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    But Apache will still be able to serve the pages? Scripts that need to write to files will still be able to do so? If it completely takes away all write access for everybody on a system level, that could break web pages. If it doesn't do that and I can use it, what is the command to undo it?
     
  4. JPC-Stefan

    JPC-Stefan Member

    Joined:
    Oct 29, 2008
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Apache will server pages fine without any problem. However the scripts for writing to files will give you error because it completely takes away all write access.

    To recursively disable write access to all files and folders under "userfolder" use:
    # chattr -R +i userfolder

    To recursively enable write access to all files and folders use:
    #chattr -R -i userfolder

    If you want to enable single file and folder you can use above command without -R option.
     
Loading...

Share This Page