-2

優れたhttp://www.rfxn.com/projects/linux-malware-detect/を共有ホスティングにインストールしようとしています。

inspath をローカル ディレクトリに変更しましたが、シンボリック リンクの作成でエラーが発生し、/usr/lib/ で読み取り専用になり、最後に /usr/local/maldetect/conf.maldet が見つかりません。

助けてくれてありがとう。これを解決すれば、多くの人にとって非常に役立つと思います。

エラーは次のとおりです。

./install.sh
ln: creating symbolic link `/usr/local/sbin/maldet' to `/home6/anton/mal/maldet': No such file or directory
ln: creating symbolic link `/usr/local/sbin/lmd' to `/home6/anton/mal/maldet': No such file or directory
cp: cannot create regular file `/usr/lib/libinotifytools.so.0': Read-only file system
Linux Malware Detect v1.3.9
            (C) 2002-2011, R-fx Networks <proj@r-fx.org>
            (C) 2011, Ryan MacDonald <ryan@r-fx.org>
inotifywait (C) 2007, Rohan McGovern <rohan@mcgovern.id.au>
This program may be freely redistributed under the terms of the GNU GPL v2

maldet(15528): {glob} /usr/local/maldetect/conf.maldet not found, aborting.

installation completed to /home6/anton/mal
config file: /home6/anton/mal/conf.maldet
exec file: /home6/anton/mal/maldet
exec link: /usr/local/sbin/maldet
exec link: /usr/local/sbin/lmd
cron.daily: /etc/cron.daily/maldet

.ca.def: line 1: /usr/local/maldetect/conf.maldet: No such file or directory
imported config options from /home6/anton/mal.last/conf.maldet

maldet(15578): {glob} /usr/local/maldetect/conf.maldet not found, aborting.

インストール bash は次のとおりです。

#!/bin/bash
#
##
# Linux Malware Detect v1.3.9
#             (C) 2002-2011, R-fx Networks <proj@r-fx.org>
#             (C) 2011, Ryan MacDonald <ryan@r-fx.org>
# inotifywait (C) 2007, Rohan McGovern  <rohan@mcgovern.id.au>
# This program may be freely redistributed under the terms of the GNU GPL v2
##
#
inspath=/home6/anton/mal
logf=$inspath/event_log
cnftemp=.ca.def

if [ ! -d "$inspath" ] && [ -d "files" ]; then
    mkdir -p $inspath
    chmod 750 $inspath
    cp -pR files/* $inspath
    chmod 750 $inspath/maldet
    ln -fs $inspath/maldet /usr/local/sbin/maldet
    ln -fs $inspath/maldet /usr/local/sbin/lmd
    cp $inspath/inotify/libinotifytools.so.0 /usr/lib/
else
    $inspath/maldet -k >> /dev/null 2>&1
    mv $inspath $inspath.bk$$
    rm -f $inspath.last
    ln -fs $inspath.bk$$ $inspath.last
        mkdir -p $inspath
        chmod 750 $inspath
        cp -pR files/* $inspath
        chmod 750 $inspath/maldet
    ln -fs $inspath/maldet /usr/local/sbin/maldet
    ln -fs $inspath/maldet /usr/local/sbin/lmd
    cp $inspath/inotify/libinotifytools.so.0 /usr/lib/
    cp -f $inspath.bk$$/sess/* $inspath/sess/ >> /dev/null 2>&1
    cp -f $inspath.bk$$/tmp/* $inspath/tmp/ >> /dev/null 2>&1
    cp -f $inspath.bk$$/quarantine/* $inspath/quarantine/ >> /dev/null 2>&1
fi

if [ -d "/etc/cron.daily" ]; then
    cp -f cron.daily /etc/cron.daily/maldet
    chmod 755 /etc/cron.daily/maldet
fi
    touch $logf
    $inspath/maldet --alert-daily
    $inspath/maldet --alert-weekly
        echo "Linux Malware Detect v1.3.9"
        echo "            (C) 2002-2011, R-fx Networks <proj@r-fx.org>"
        echo "            (C) 2011, Ryan MacDonald <ryan@r-fx.org>"
        echo "inotifywait (C) 2007, Rohan McGovern <rohan@mcgovern.id.au>"
        echo "This program may be freely redistributed under the terms of the GNU GPL"
    echo ""
    echo "installation completed to $inspath"
    echo "config file: $inspath/conf.maldet"
    echo "exec file: $inspath/maldet"
    echo "exec link: /usr/local/sbin/maldet"
    echo "exec link: /usr/local/sbin/lmd"
    echo "cron.daily: /etc/cron.daily/maldet"
    echo ""
    if [ -f "$cnftemp" ] && [ -f "$inspath.bk$$/conf.maldet" ]; then
        . files/conf.maldet
        . $inspath.bk$$/conf.maldet
        . $cnftemp
        echo "imported config options from $inspath.last/conf.maldet"
    fi
    $inspath/maldet --update 1
4

1 に答える 1

1

ほとんどの共有ホスティングでは、ユーザーがシステム フォルダーにアクセスすることを許可していません。

/usr/lib/
/usr/local/

は、システム フォルダの一例です。したがって、この制限により、そのソフトウェアをインストールできないと思います。

于 2011-03-30T23:56:44.347 に答える