Results 1 to 24 of 24
  1. #1
    Join Date
    Mar 2004
    Posts
    49

    Errors 'a plenty

    I believe all the errors below are related since they started at about the same time, that's why I thought it would be more useful to post them all in one post, as it might bring more insight in what is causing the problem.

    Error Nr 1 (BASH commands not found)

    Every time I start up a session in SSH (disabled root login) I get this:

    PHP Code:
    -bashidcommand not found
    -bash: [: =: unary operator expected
    -bashidcommand not found
    -bashdircolorscommand not found
    -bashidcommand not found
    -bash: [: =: unary operator expected
    -bashtrcommand not found
    -bashtrcommand not found
    -bashwhoamicommand not found
    -bashmesgcommand not found
    -bashdircolorscommand not found 
    Error Nr 2 : Cpanel crons

    (would this stop some cpanel crons from running? I got some emails like:
    /bin/sh: line 1: /usr/bin/python2: Permission denied
    /bin/sh: line 1: anaconda-ks.cfg: command not found

    Here are some subject email headers:

    PHP Code:
    Here are some Subject Email Headers:

    Cron <mailman@_______> /usr/bin/python2 -/usr/local/cpanel/3rdparty/mailman/cron/disabled

    Cron 
    <mailman@_______> /usr/bin/python2 -/usr/local/cpanel/3rdparty/mailman/cron/senddigests

    Cron 
    <mailman@_______> /usr/bin/python2 -/usr/local/cpanel/3rdparty/mailman/cron/checkdbs 
    ls info:

    PHP Code:
    ls -l python2
    lrwxr
    -xr-x    1 root     root            6 Mar  3 03:16 python2 -> python
    seems to be a link for

    PHP Code:
    ls -l python
    -rwxr-xr-x    2 root     root       795584 Aug  8  2003 python
    PHP Code:
    -rwxr-xr-x 1 mailman mailman 8194 Mar 2 14:40 /usr/local/cpanel/3rdparty/mailman/cron/disabled
    These permissions are correct, right?

    Error Nr 3 : Awstats not working

    PHP Code:
    AwStats used to work finebut now I get this message:

    Code:
    Content-typetext/html
    Internal Server Error

          Unable to open document 
    (./awstats.plat cpaneld.pl line 1228
       main
    ::dodoc() called at cpaneld.pl line 516 
    Error Nr 4 : Cpanel Disk Meter

    In cPanel this is displayed:

    PHP Code:
    Disk usage :Serious problem while fetching quota data (quota): Permission denied (-1Megabytes 
    Some changes I made recently

    Does anyone know where this may come from? I made some changes to several things such as

    PHP Code:
    chmod -R 700 /etc/rc.d/init.d/* 
    but I already tried chmod -R 777 /etc/rc.d/init.d/*, i still got the error.


    PHP Code:
    chmod 700 /bin/rpm 
    PHP Code:
    chattr /etc/passwd , /etc/shadow, /etc/group, /etc/gshadow, /etc/services 
    PHP Code:
    edited /etc/fstab : /home nosuid,nodev 
    PHP Code:
    5edited /etc/host.conf
    order bind
    ,host
    multi on
    nospoof on 
    PHP Code:
    edited /etc/inetd.confcommented telnettalkntalk 
    PHP Code:
    edited /etc/profile TMOUT=3600 
    PHP Code:
    edited /etc/login.defs PASS_MIN_LEN changed to 8 
    PHP Code:
    disabled talk,ntalk in /etc/xinetd.d/talkntalk 
    PHP Code:
    10 cd /usr/bin/
    chmod 000 perlcc byacc yacc bcc kgcc cc gcc i386*cc
    chmod 000 
    *c++ *g++
    chmod 000 /usr/lib/bcc /usr/lib/bcc/bcc-cc1 
    So, what did I do wrong and how can I fix it?

    Thanks!

    This is the contents of my .bashrc file for the user I log in with :

    PHP Code:
    Code:
    # .bashrc

    # User specific aliases and functions

    # Source global definitions
    if [ -/etc/bashrc ]; then
            
    . /etc/bashrc
    fi 
    Is it normal?

    Here is /etc/bashrc if needed:

    PHP Code:
    Code:
    # /etc/bashrc

    # System wide functions and aliases
    # Environment stuff goes in /etc/profile

    # For some unknown reason bash refuses to inherit
    # PS1 in some circumstances that I can't figure out.
    # Putting PS1 here ensures that it gets loaded every time.
    alias which="type -path"
    export EDITOR="pico"
    export VISUAL="pico"
    PS1="\u@\h [\w]# "

    whoami=`whoami`
    if [ -
    "~/.dns" ]; then
            DNS
    =`cat ~/.dns`
            
    PS1="\u@$DNS [\w]# "
    else
            if [ -
    "/var/cpanel/users/$whoami]; then
                    
    eval `grep DNS= /var/cpanel/users/$whoami`

                    if [ ! 
    "$DNS"" ]; then
                            
    echo -"$DNS> ~/.dns
                            PS1
    ="\u@$DNS [\w]# "
                    
    fi
            fi
    fi

    if [ ! -~/public_html/cgi-bin ]; then
            mkdir 
    -~/public_html/cgi-bin
    fi
    if [ ! -~/public_ftp ]; then
            mkdir 
    -~/public_ftp
    fi

    mesg y

    alias wtf
    ="watch -n 1 w -hs"
    alias wth="ps -uxa | more"
    # Now for the dos users
    alias dir="ls"
    alias copy="cp"
    alias del="rm"
    alias deltree="rm -r"
    alias move="mv"
    alias ff="whereis"
    alias attrib="chmod"
    alias edit="pico"
    alias chdir="cd"
    alias mem="top"
    alias search="grep"
    alias pico="pico -w -z"


    LS_OPTIONS='--color=tty -F -a -b -T 0';
    export LS_OPTIONS;
    alias ls='/bin/ls $LS_OPTIONS';
    alias dir='/bin/ls $LS_OPTIONS --format=vertical';
    alias vdir='/bin/ls $LS_OPTIONS --format=long';
    alias d=dir;
    alias v=vdir;
    eval `
    dircolors -b`


    export JAVA_HOME=/usr/local/jdk
    export PATH
    =$JAVA_HOME/bin:$PATH
    export CLASSPATH
    =.:$JAVA_HOME/lib/classes.zip
    export PATH
    ="$PATH:/usr/local/bin:/usr/X11R6/bin"

    #cPanel Added Limit Protections -- BEGIN

    #unlimit so we can run the whoami
    ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null

    LIMITUSER
    =$USER
    if [ -"/usr/bin/whoami" ]; then
            LIMITUSER
    =`/usr/bin/whoami`
    fi
    if [ "$LIMITUSER!= "root" ]; then
            ulimit 
    -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
    else
            
    ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
    fi
    #cPanel Added Limit Protections -- END 
    Thanks for reading my post to the end

  2. #2
    Join Date
    Jan 2003
    Posts
    1,715
    That's pretty screwy. It looks like /usr/bin (or whatever partition it's on) is set noexec.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

  3. #3
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    Definitely some problems with permissions/settings for certain partitions. It was mentioned that "the errors started at about the same time" which brings up a natural question, "What was done to Server just before the problems started?" -- which should help with the answer(s).
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  4. #4
    Join Date
    Mar 2004
    Posts
    49
    I listed all the changes I made in my original post Rob (at least those that I remember, heh), but here is /etc/fstab if that might help :

    (I changed the home partition at around that time too I think, but forgot about it)


    PHP Code:
    LABEL=/                 /                       ext3    defaults,usrquota        1 1
    LABEL
    =/boot             /boot                   ext3    defaults        1 2
    none                    
    /dev/pts                devpts  gid=5,mode=620  0 0
    LABEL
    =/home             /home                   ext3    defaults,usrquota,nosuid,nodev        1 2
    none                    
    /proc                   proc    defaults        0 0
    none                    
    /dev/shm                tmpfs   nodev,noexec,nosuid        0 0
    LABEL
    =/tmp              /tmp                    ext3    nodev,noexec,nosuid        1 2
    LABEL
    =/usr              /usr                    ext3    defaults,usrquota        1 2
    LABEL
    =/var              /var                    ext3    defaults,usrquota        1 2
    /dev/hda8               swap                    swap    defaults        0 0 

  5. #5
    Join Date
    Mar 2004
    Posts
    49
    I found another error when using PHPBB2 and logging into the administrator center the menu on the left isn't displayed:

    PHP Code:
    Forbidden
    You don
    't have permission to access /admin/index.php on this server? 
    Ugh..I need this fixed asap, want to resume normal working conditions

  6. #6
    Join Date
    May 2003
    Posts
    1,198
    All the permission on your server messed up.

  7. #7
    Join Date
    Mar 2004
    Posts
    49
    The permissions in my /etc/fstab?

    Is there anywhere I can see what the default permissions would be for a Red Hat 9 box?

  8. #8
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    /home
    /dev/shm
    /tmp

    Those partitions seem to have somewhat 'odd' settings as they are too restrictive. May I ask what the "change" was that you mentioned, before everything went kaablewee?

    We know some of the 'what' but without knowing the 'why', for your current fstab settings, might not be a good idea to just start changing things around.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  9. #9
    Join Date
    Mar 2004
    Posts
    49
    It was recommended to me that /dev/shm and /tmp should have nodev, nosuid, noexec for security reasons.

    This was done earlier before the errors started. (as far as I know)

    I also added the nodev, nosuid to /home for security, I read somewhere about that.

    However, I just removed them and mounted /home again, and now I see this error when I look at my site :

    PHP Code:
    Server Error
    The following error occurred
    :

    Could not connect to the server
    Please contact the administrator

    So I added them again, but the error remains. I can log in to SSH fine. What the hell is going on? :'(

    What would a normal /home look like in /etc/fstab?

  10. #10
    Join Date
    Mar 2004
    Posts
    49
    The latest and greatest error seems to be related to mod_security although I do not know why, I haven't made any changes to it. Only /etc/fstab ( which i reverted to )

    PHP Code:
    [Mon Mar  8 03:03:04 2004] [error] [client 127.0.0.1mod_securityAccess denied with code 500. Pattern match "^$" at HEADER.
    [
    Mon Mar  8 03:03:04 2004] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:05:00 2004] [error] [client 127.0.0.1mod_securityAccess denied with code 500. Pattern match "^$" at HEADER.
    [
    Mon Mar  8 03:05:00 2004] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:10:00 2004] [error] [client 127.0.0.1mod_securityAccess denied with code 500. Pattern match "^$" at HEADER.
    [
    Mon Mar  8 03:10:00 2004] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:11:24 2004] [error] [client 127.0.0.1mod_securityAccess denied with code 500. Pattern match "^$" at HEADER.
    [
    Mon Mar  8 03:11:24 2004] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:14:16 2004] [error] (2)No such file or directoryIncorrect permissions on webroot "/home/pf/public_html/_vti_pvt" and webroot's _vti_pvt direc
    tory in FrontPageAlias().
    [Mon Mar  8 03:15:00 2004] [error] [client 127.0.0.1] mod_security: Access denied with code 500. Pattern match "^$" at HEADER.
    [Mon Mar  8 03:15:00 2004] [error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:19:44 2004] [error] [client 127.0.0.1] mod_security: Access denied with code 500. Pattern match "^$" at HEADER.
    [Mon Mar  8 03:19:44 2004] [error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:20:01 2004] [error] [client 127.0.0.1] mod_security: Access denied with code 500. Pattern match "^$" at HEADER.
    [Mon Mar  8 03:20:01 2004] [error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:25:00 2004] [error] [client 127.0.0.1] mod_security: Access denied with code 500. Pattern match "^$" at HEADER.
    [Mon Mar  8 03:25:00 2004] [error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:28:05 2004] [error] [client 127.0.0.1] mod_security: Access denied with code 500. Pattern match "^$" at HEADER.
    [Mon Mar  8 03:28:05 2004] [error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/500.shtml
    [Mon Mar  8 03:30:00 2004] [error] [client 127.0.0.1] mod_security: Access denied with code 500. Pattern match "^$" at HEADER.
    [Mon Mar  8 03:30:00 2004] [error] [client 127.0.0.1] File does not exist: /usr/local/apache/htdocs/500.shtml 

  11. #11
    Join Date
    Mar 2004
    Posts
    49
    Offcourse, the error could have also been caused by something else, as I had also done a reboot of my system which might have caused some kind of error.

    apache is now contiously failing and I receive these emails from Server Monitor regularly :

    PHP Code:
    apache failed Mon Mar  8 05:08:16 2004. A restart was attempted automagicly

  12. #12
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    Originally posted by Website Rob
    We know some of the 'what' but without knowing the 'why', for your current fstab settings,
    might not be a good idea to just start changing things around.
    I think you now know why I specifically mentioned that.

    For a quick 'n dirty fix, till an experienced person can get in and look around, the following should help.

    change your fstab to match the following 3 areas:
    PHP Code:
    /home                   ext3    defaults,usrquota        1 2
    /dev/shm                tmpfs   defaults        0 0
    /tmp                    ext3    noexec,nosuid                   1 2 
    Once you have made your changes to fstab, save the file, exit to the command line, type: mount -a

    Further security can be done after test & verify of the above.


    Disable or remove mod_security

    Restart Apache

    # tail -f /usr/local/apache/logs/error_log

    To see what is going on.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  13. #13
    Join Date
    Mar 2004
    Posts
    49
    I changed my /etc/fstab to what you recommended. I tried to see if it would already solve some problems but I still receive the bash errors when logging in.

    I also changed my httpd.conf file to comment these things:

    PHP Code:
    # LoadModule security_module    libexec/mod_security.so
    # AddModule mod_security.c
    # Include /etc/httpd/conf/mod_sec.conf 
    That should stop mod_security from loading.

    I tried (re)starting apache with the command /usr/local/apache/bin/apachectl restart but this is the error that I receive:

    PHP Code:
    root@______ [/usr/local/apache/bin]# ./apachectl restart
    ./apachectl restarthttpd not runningtrying to start
    Syntax error on line 215 of 
    /usr/local/apache/conf/httpd.conf:
    Cannot load /usr/local/apache/libexec/libphp4.so into serverlibX11.so.6cannot open shared object fileNo such file or directory
    ./apachectl restarthttpd could not be started 
    I checked in the specified directory and libphp4.so is there.

    Here are it's permissions:

    PHP Code:
    -rwxr-xr-x    1 root     root      4052289 Mar  5 09:40 libphp4.so
    I however, cannot locate libX11.so.6

  14. #14
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    I'm not sure why I've been the only one to respond to your thread as there are people that are lots more knowledgable than I on this subject, and hopefully they'll offer some clues.

    The only further suggestions I can make is to comment out the following lines in httpd.conf:

    LoadModule php4_module
    AddModule mod_php4.c

    This, of course, will disable PHP but should bring Apache up or lead you to another problem. Remember to restart Apache but before you do, after every edit/save to httpd.conf run this command:

    /usr/local/apache/bin/httpd -t

    as it will tell you if any problems. You only want to see: Syntax OK -- although a 'Warning' msg. can also be ignored for now -- and then you'll know it's safe to restart Apache.

    If Apache restarts OK then recompile PHP to get it working again.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  15. #15
    Join Date
    Mar 2004
    Posts
    49
    Ok, Apache works again :-)

    Now for recompiling PHP, hmm never done that. Do you know any tutorial to do it?

    I tried running /scripts/easyapache so that it would reinstall apache and configure php, but it also complained about that libX11 thingie..

  16. #16
    Join Date
    Mar 2004
    Posts
    49
    I just did a chmod 755 /usr/bin and everything seems to work again; awstats, cpanel disk usage, no more bash login errors, etc

    The only thing that still isn't working is php: When I run /scripts/easyapache it displays this:

    hecking for XpmFreeXpmImage in -lXpm... no
    configure: error: Problem with libXpm.(a|so) or libX11.(a|so). Please check config.log for more information.

    Any idea where I can find this file?

  17. #17
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    Good troubleshooting.

    You can now try uncommenting the PHP entries mentioned earlier, run the test command and, if no errors restart Apache.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  18. #18
    Join Date
    Mar 2004
    Posts
    49
    No, the error is remaining :

    PHP Code:
    root@_______ [/usr/local/apache/bin]# ./apachectl configtest
    Syntax error on line 218 of /usr/local/apache/conf/httpd.conf:
    Cannot load /usr/local/apache/libexec/libphp4.so into serverlibX11.so.6cannot open shared object fileNo such file or directory 
    Any ideas?

  19. #19
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,560
    find / -name libX11.so.6

  20. #20
    Join Date
    Mar 2004
    Posts
    49
    hi Slidey, the command displays nothing. Any other ideas?

  21. #21
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,560
    install the XFree86-libs package

  22. #22
    Join Date
    Mar 2004
    Posts
    49
    Where do I find this for Redhat 9? Sorry if this seems a stupid question, I only got my server about 5 days and am still very much a newbie towards it all.

    Thank you

  23. #23
    Join Date
    Mar 2004
    Posts
    49
    Well, I can find the installation files on XFree86.org, but they do not provide RPMs of any version. Where can I find the rpm's of the latest version?

  24. #24
    Join Date
    Apr 2003
    Location
    UK
    Posts
    2,560

Posting Permissions

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