Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Xia
    Xia is offline
    Just Joined!
    Join Date
    Mar 2004
    Posts
    1

    Screwy Linux System (RH9)


    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:

    Code:
        -bash: id: command not found
        -bash: [: =: unary operator expected
        -bash: id: command not found
        -bash: dircolors: command not found
        -bash: id: command not found
        -bash: [: =: unary operator expected
        -bash: tr: command not found
        -bash: tr: command not found
        -bash: whoami: command not found
        -bash: mesg: command not found
        -bash: dircolors: command 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

    Here are some subject email headers:

    Code:
    Cron <mailman@_______> /usr/bin/python2 -S /usr/local/cpanel/3rdparty/mailman/cron/disabled
    
        Cron <mailman@_______> /usr/bin/python2 -S /usr/local/cpanel/3rdparty/mailman/cron/senddigests
    
        Cron <mailman@_______> /usr/bin/python2 -S /usr/local/cpanel/3rdparty/mailman/cron/checkdbs

    ls info:

    Code:
    ls -l python2
        lrwxr-xr-x    1 root     root            6 Mar  3 03&#58;16 python2 -> python*

    seems to be a link for

    Code:
        ls -l python
        -rwxr-xr-x    2 root     root       795584 Aug  8  2003 python*

    Code:
        -rwxr-xr-x 1 mailman mailman 8194 Mar 2 14&#58;40 /usr/local/cpanel/3rdparty/mailman/cron/disabled*

    These permissions are correct, right?

    Error Nr 3 : Awstats not working

    AwStats used to work fine, but now I get this message:

    Code:
        Content-type&#58; text/html
        Internal Server Error
    
              Unable to open document &#40;./awstats.pl&#41; at cpaneld.pl line 1228
           main&#58;&#58;dodoc&#40;&#41; called at cpaneld.pl line 516

    Error Nr 4 : Cpanel Disk Meter

    In cPanel this is displayed:

    Code:
        Disk usage &#58;Serious problem while fetching quota data &#40;quota&#41;&#58; Permission denied &#40;-1&#41; Megabytes
    Error Nr 5 : PHPBB2 Admin Area not working

    I found another error when using PHPBB2 and logging into the administrator center the menu on the left isn't displayed:

    Code:
        Forbidden
        You don't have permission to access /admin/index.php on this server?
    Error Nr6 : Apache not working

    After a reboot apache didn't seem to work anymore:

    Code:
        Server Error
        The following error occurred&#58;
    
        Could not connect to the server
        Please contact the administrator.
    Thislatest and greatest error seems to be related to mod_security (or something because of the reboot)

    Code:
        &#91;Mon Mar  8 03&#58;03&#58;04 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;03&#58;04 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;05&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;05&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;10&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;10&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;11&#58;24 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;11&#58;24 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;14&#58;16 2004&#93; &#91;error&#93; &#40;2&#41;No such file or directory&#58; Incorrect permissions on webroot "/home/pf/public_html/_vti_pvt" and webroot's _vti_pvt direc
        tory in FrontPageAlias&#40;&#41;.
        &#91;Mon Mar  8 03&#58;15&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;15&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;19&#58;44 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;19&#58;44 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;20&#58;01 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;20&#58;01 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;25&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;25&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;28&#58;05 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;28&#58;05 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
        &#91;Mon Mar  8 03&#58;30&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; mod_security&#58; Access denied with code 500. Pattern match "^$" at HEADER.
        &#91;Mon Mar  8 03&#58;30&#58;00 2004&#93; &#91;error&#93; &#91;client 127.0.0.1&#93; File does not exist&#58; /usr/local/apache/htdocs/500.shtml
    apache is now contiously failing and I receive these emails from Server Monitor regularly :

    Code:
        apache failed @ Mon Mar  8 05&#58;08&#58;16 2004. A restart was attempted automagicly.

    Some changes I made recently

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

    Code:
        1 &#41; chmod -R 700 /etc/rc.d/init.d 1 &#41; 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.


    Code:
        2 &#41; chmod 700 /bin/rpm

    Code:
        3 &#41; chattr + i /etc/passwd , /etc/shadow, /etc/group, /etc/gshadow, /etc/services

    Code:
        4 &#41; edited /etc/fstab &#58; /home + nosuid,nodev

    Code:
        5&#41; edited /etc/host.conf
        order bind,host
        multi on
        nospoof on

    Code:
        6 &#41; edited /etc/inetd.conf, commented telnet, talk, ntalk

    Code:
        7 &#41; edited /etc/profile TMOUT=3600

    Code:
        8 &#41; edited /etc/login.defs PASS_MIN_LEN changed to 8
    Code:
        9 &#41; disabled talk,ntalk in /etc/xinetd.d/talk, ntalk

    Code:
        10 &#41; 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 :

    Code:
        Code&#58;
        # .bashrc
    
        # User specific aliases and functions
    
        # Source global definitions
        if &#91; -f /etc/bashrc &#93;; then
                . /etc/bashrc
        fi

    Is it normal?

    Here is /etc/bashrc if needed:

    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 &#91;w&#93;# "
    
        whoami=`whoami`
        if &#91; -e "~/.dns" &#93;; then
                DNS=`cat ~/.dns`
                PS1="u@$DNS &#91;w&#93;# "
        else
                if &#91; -e "/var/cpanel/users/$whoami" &#93;; then
                        eval `grep DNS= /var/cpanel/users/$whoami`
    
                        if &#91; ! "$DNS" = "" &#93;; then
                                echo -n "$DNS" > ~/.dns
                                PS1="u@$DNS &#91;w&#93;# "
                        fi
                fi
        fi
    
        if &#91; ! -e ~/public_html/cgi-bin &#93;; then
                mkdir -p ~/public_html/cgi-bin
        fi
        if &#91; ! -e ~/public_ftp &#93;; then
                mkdir -p ~/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&#58;$PATH
        export CLASSPATH=.&#58;$JAVA_HOME/lib/classes.zip
        export PATH="$PATH&#58;/usr/local/bin&#58;/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 &#91; -e "/usr/bin/whoami" &#93;; then
                LIMITUSER=`/usr/bin/whoami`
        fi
        if &#91; "$LIMITUSER" != "root" &#93;; 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
    Here is my /etc/fstab file:

    Code:
        PHP&#58;
        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
    I already changed /home back to without nosuid, nodev doesn't make a differnce.

    Thanks for reading my post to the end

  2. #2
    Linux Newbie
    Join Date
    Mar 2003
    Location
    Istanbul/Türkiye
    Posts
    246
    For question 1.

    Write all the things to your bashrc file step by step. After each step
    Code:
    source bashrc
    so, if there is an error you can see immediately..
    Just a Newbie....Looking 4 Info....

  3. #3
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    I'm no programmer, but I do know that cpanel (I'll assume you paid for it) comes with some support.

    See http://www.cpanel.net/support/index.htm for "Suppport Request Form", "FAQ", "Documentation" and even a Q&A board. Since it's thier app and you paid for the support why not give it a try? I've used it abit and it not for light weights like myself to setup for many of the feature et...
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  4. $spacer_open
    $spacer_close

Posting Permissions

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