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.

Unable to open HTTPD.Conf file.

Discussion in 'General Discussion' started by inogenius, Jan 21, 2004.

  1. inogenius

    inogenius Well-Known Member

    Joined:
    Apr 16, 2003
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cleveland, Ohio
    cPanel Access Level:
    DataCenter Provider
    Okay, about two weeks ago the server got hacked. Restored it to Red Hat Enterprise 3, re built all the accounts.

    Now in cPanel all my customers get this error;
    Fatal Error! Unable to open httpd config file /usr/local/apache/conf/httpd.conf

    It really is writeable though. You can add an add-on domain or subdomain. It'll spit out an error, but it actually does go through. I can change the CHMOD settings and the error will go away until /scripts/upcp is ran again. It then returns.
    Submitted a ticket to cPanel and all they did was the quick fix of changing the CHMOD settings.

    Anyone else know of anything that might fix it?
     
  2. trakwebster

    trakwebster Well-Known Member

    Joined:
    Jan 29, 2003
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    I'm not very knowledgeable about this, but first, are you really spelling it HTTPD.Conf? (Because it *should* be spelled httpd.conf.)

    Nextly, who owns it?

    If you can open it and cpanel can't, then perhaps it's owned by you, but not by the user that cpanel is, if you follow me.
     
  3. inogenius

    inogenius Well-Known Member

    Joined:
    Apr 16, 2003
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cleveland, Ohio
    cPanel Access Level:
    DataCenter Provider
    Yeah, I'm actually spelling it httpd.conf. I don't know why I capitalized it in the title. Lack of sleep maybe.

    I gotcha for the "own" settings. I'll have to look into that.
     
  4. inogenius

    inogenius Well-Known Member

    Joined:
    Apr 16, 2003
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cleveland, Ohio
    cPanel Access Level:
    DataCenter Provider
    Ah, turns out you need to change all 300 of the httpd.conf files CHMOD settings.
     
  5. orb_sp

    orb_sp Active Member

    Joined:
    Aug 7, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    I don't know about you but all I have to do is chmod o=r on the one /usr/local/apache/conf/httpd.conf.

    However, I seem to lose the permissions on the file. I'm assuming that an update of sorts resets the permissions.
     
  6. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Are you running a grsecurity patched server?

    I have seen this error on all of my grsecurity patched cpanel servers but not on my one non-grsec cpanel server.
     
  7. orb_sp

    orb_sp Active Member

    Joined:
    Aug 7, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Does anyone have any idea as to how to fix this?

    My server did have grsecurity installed but has since been removed.


    - orb_sp
     
  8. Def

    Def Well-Known Member

    Joined:
    Feb 21, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    I'm getting this as well. Anyone know a fix?

    Thanks.
     
  9. SACHIN

    SACHIN Guest

    chmod

    chmod 644 /etc/httpd/conf/httpd.conf

    :)
     
  10. eglwolf

    eglwolf Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Has this been fixed yet, becuase I still have this problem, and it is cuasing alot of problem. Or can someone tell me how to create a cron script to do the permissions change??
     
  11. SACHIN

    SACHIN Guest

    cron script

    Hello,

    1)vi chht
    2)insert following syntax
    3)save it
    4)chmod 755 chht
    5)mv chht /etc/cron.d/




    #!/bin/sh
    * * * * * root /bin/chmod 644 /etc/httpd/conf/httpd.conf


    it will be work gr8.... :)
     
  12. tjb

    tjb Registered

    Joined:
    Jun 16, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have two server with this, fixed one

    Hi first off i am new to servers but i had this on two servers. I can fix it by running a cron every minute to change the chmod of http.conf to 644. This works but is not great as when a customers adds a park or sub domain they see the fatal eror mgs for one minute.

    My small server in the end had to be reinstalled by the provider, cpanel installed again and the accounts brought back. Everything is fine again.

    However my second server which is my main server can not afford tobe down that long so I really need a fix for this

    Has anyone fixed the contance changing of the chmod of http.conf and if so can they explain how to do it?

    Thank you for any help offered.
    TJ
     
  13. b0072k1

    b0072k1 Well-Known Member

    Joined:
    Dec 30, 2004
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Glasgow
    im still getting this problem
     
  14. SACHIN

    SACHIN Guest

    try this one

    hello,

    please do the following steps.

    vi /usr/local/cpanel/bin/chmodhttpdconf
    set 644

    we have to find which cpanel script change the httpd.conf permission so that we can fix this issue permanently.
     
  15. eglwolf

    eglwolf Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16

    I have done this however I still get the error. I only get it on centos 3.4 server I have. Any other solutions in the mix?
     
  16. bagel50

    bagel50 Member

    Joined:
    Jun 1, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    got the same error after a change to current tree and then back to release, changed the above script to chmod to 644, and it worked, temporarily. Anyone found a bugzilla entry on this issue? I'm not quite sure how to look.
    Olly
     
Loading...

Share This Page