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.

CentOS 4 Issue

Discussion in 'General Discussion' started by Napuunoa, Jul 1, 2005.

  1. Napuunoa

    Napuunoa Registered

    Joined:
    Jun 18, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iowa
    I am currently having some trouble with my install of CentOS 4 (disabled SELinux).

    Everything goes perfect until this runs(viewed in top): /scripts/selinux_custom_contexts

    I viewed the process happening and the process took down my memory like the cookie monster eating a cookie. Is there a way I can disable this script from starting?
     
  2. jerrek71

    jerrek71 Active Member

    Joined:
    Jul 27, 2006
    Messages:
    42
    Likes Received:
    1
    Trophy Points:
    6
    From what I can tell from looking around, this setfiles program is to set security contexts on programs and is related to SELinux.

    If you're NOT using SELinux you can do what I did;

    login to your server as root, or get a root shell.
    cd /usr/sbin
    mv setfiles setfiles.old
    edit setfiles

    create a shell script along the lines of;

    Code:
    #!/bin/sh
    
    echo "Setfiles is removed on this system"
    
    chmod a+x setfiles

    And then next time you upgrade it'll fly by....

    If you ARE using SELinux then this isn't likely to be a good idea!!
     
  3. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    So for CentOS 4 with SELinux disabled, this setfiles modification is totally safe?

    If so, then I can't thank you enough - the annoying setfiles routine that runs when /scripts/upcp runs has been annoying the heck out of me for ages.

    I'm referring to the following type of output from the nightly run of /scripts/upcp:

    Code:
    /usr/sbin/setfiles:  read 2 specifications
    /usr/sbin/setfiles:  labeling files under /
    /usr/sbin/setfiles:  hash table stats: 1 elements, 1/65536 buckets used, longest chain length 1
    /usr/sbin/setfiles:  Done.
    This indeed does take an age or two to complete and preventing it running would be wonderful.
     
Loading...

Share This Page