Come ben sapete abbiano un problema con diversi pacchetti che impostano permessi non corretti al nostro sistema.
Per risolvere questo problema potete provate questo script messo a disposizione da Matteo (ZeroUno).
Ovviamente se trovate qualche difetto nello script non abbiate timore ad avvisare me o Matteo.
Codice: Seleziona tutto
#!/bin/bash
if [ $(id -u) -ne 0 ];then
echo "You must be root!"
exit
fi
KNOWN_BAD="artha-0.9.1-i686-1uls tabble-0.40-i486-4sl codeblocks-8.02-i486-5as fpc-2.2.4-i386-2ld ginac-1.5.3-i486-1pfb lemon-20091027-i486-1an littlewizard-1.2.2-i486-3bj eqonomize-0.6-i486-1as figlet-2.2.2-i486-4an gshutdown-0.2-i486-4as gwhere-0.2.3-i486-4sl incollector-1.2-i486-2as numeric-24.2-i486-4as splint-3.1.2-i486-3as treecc-0.3.10-i486-4as valgrind-3.5.0-i486-2as xdelta-1.1.4-i486-4gi freecol-0.8.4-i486-2dav globulation2-0.9.4.4-i686-1cp netpanzer-0.8.2-i486-4gal pinball-0.3.1-i486-5pv pygame-1.9.1-i486-1as toppler-1.1.3-i486-4as xmame-0.106-i486-6as xsoldier-1.4-i486-4pfb comix-4.0.4-noarch-2sl mtpaint-3.31-i486-2as pyopengl-3.0.1a3-i486-2as lshw-B.02.14-i686-2sl clanlib-2.0.4-i486-1sl dclib-0.3.23-i486-2ag fam-2.7.0-i486-4sl libbraille-0.19.0-i686-7as libharu-20091027-i486-1an libmikmod-3.1.12-i486-4sl libnsbmp-20091027-i486-1an libnsgif-20091027-i486-1an libpaper-1.1.23+nmu1-i486-1as libprelude-0.9.24.1-i486-1sl mowitz-0.3.1-i486-4as nextaw-0.15.1-i486-4as physfs-2.0.0-i486-3gal revel-1.1.0-i486-4as xerces-c-2.8.0-i686-3as blop-0.2.8-i486-4as cdcd-0.6.6-i486-2sl cddb-1.4-i686-2as dvdisaster-0.72.1-i486-1sl eyed3-0.6.17-i686-2as exaile-0.3.0.2-i486-1as gmms-0.0.1-i686-4as helixplayer-11.0.0.4052-i586-4as optimfrog-4520b1-i686-1as picoxine-0.0.7-i686-4as pyogg-1.3-i486-4as ruby_mp3info-0.6.13-noarch-2as shorten-3.6.1-i486-4as snack-2.2.10-i686-4as smpeg-20091010-i486-1as tovid-0.31-i486-4as chillispot-1.1.0-i486-3ks gajim-0.12.5-i486-1sl frostwire-4.18.1-noarch-1sl howl-1.0.0-i486-6ms limewire-5.2.13-i386-2sid mailody-1.5.0alfa1-i486-1as lutz-0.8.1-i486-2cf mozilla-firefox-it-3.5.6-i686-1sl mpop-1.0.18-i486-1bj mozilla-thunderbird-it-3.0-i686-1sl netsurf-20091028-i686-1an pinger-0.2-noarch-4as urlview-0.9-i486-4ms calcurse-2.7-i486-1bj html2text-1.3.2a-i486-4bj opale-1.0rc3-i486-3sl podofo-0.7.0-i686-2as siag-3.6.1-i486-4as texmacs-1.0.7.2-i486-2ms chkrootkit-0.49-i686-1uls afick-2.14-noarch-1bj bpkg-0.5-noarch-4as opensc-0.11.10-i486-1sl psyco-1.6-i486-4gal safecopy-1.6-i486-1cf zope.interface-3.3.0-noarch-3sl tracepkg-1.1.0rc3-noarch-3ajk mdf2iso-0.3.0-i486-4as nrg2iso-0.4-i686-4as pdi2iso-0.1-i686-4as pavuk-0.9.35-i486-4bj re2c-0.13.5-i486-3an recoverjpeg-1.1.4-i486-2mch rsibreak-0.10-i486-1as searchmonkey-0.8.1-i486-4bj shed-1.15-i486-2an sitecopy-0.16.6-i486-3as slackdeptrack-0.1.3-noarch-4sl sweethome3d-2.1-i586-2uls tilda-0.9.6-i486-4dx"
DB=/var/log/packages
RM=/var/log/removed_packages
cd $DB
echo "searching for known bad packages"
for B in $KNOWN_BAD;do
if [ -e $B ];then
echo "WARNING!! $B currently installed package is a known bad package!"
fi
done
cd $RM
for B in $KNOWN_BAD;do
if ls $B >/dev/null 2>&1 || ls $B-* >/dev/null 2>&1;then
echo "NOTICE!! $B previous installed packages is a known bad package!"
fi
done
echo "searching for bad directory"
inst=$(mktemp)
remo=$(mktemp)
nofo=$(mktemp)
df -t ext2 -t ext3 -t ext4 -t reiserfs|awk '{print $6}'|tail +2|while read part;do
echo $part filesystem
find $part -mount -type d -perm 0777 | while read dir;do
echo -n "$dir have 0777 permission; "
tmp=$(echo $dir|cut -c2-)
d=$(cat $DB/*|grep ^$tmp/$|wc -l)
if [ $d -ne 0 ];then
echo $tmp >>$inst
echo -n "it is found in $d installed packages; "
fi
r=$(cat $RM/*|grep ^$tmp/$|wc -l)
if [ $r -ne 0 ];then
echo $tmp >>$remo
echo -n "it is found in $r uninstalled or upgraded packages; "
fi
if [[ $d -eq 0 && $r -eq 0 ]];then
echo $tmp >>$nofo
echo -n "it is not found in packages database; "
fi
echo
done
done
echo
echo
echo
if [ $(cat $inst|wc -l) -eq 0 ];then
echo "No problems found in any installed package."
else
echo "$(cat $inst|wc -l) bad permissions found in installed packages:"
cat $inst
echo
echo -n "Do you want reset to 755 for these directory? (y/n) : "
while true;do
read q
case $q in
"y"|"Y") cd /
for d in $(cat $inst);do
echo "chmod 755 /$d"
chmod 755 /$d
sed -i -r -e "s|^$d$||" -e "/^$/d" $remo
done
echo "done."
break
;;
"n"|"N") echo "skipped."
break
;;
*) echo -n "please type 'y' or 'n': "
;;
esac
done
fi
echo
echo
echo
if [ $(cat $remo|wc -l) -eq 0 ];then
echo "No problems found in any uninstalled or upgraded package."
else
echo "$(cat $remo|wc -l) bad permissions found in uninstalled or upgraded packages:"
cat $remo
echo
echo -n "Do you want reset to 755 for these directory? (y/n) : "
while true;do
read q
case $q in
"y"|"Y") cd /
for d in $(cat $remo);do
echo "chmod 755 /$d"
chmod 755 /$d
done
echo "done."
break
;;
"n"|"N") echo "skipped."
break
;;
*) echo -n "please type 'y' or 'n': "
;;
esac
done
fi
echo
echo
echo
if [ $(cat $nofo|wc -l) -eq 0 ];then
echo "No other bad permissions found."
else
echo "$(cat $nofo|wc -l) bad permissions found:"
cat $nofo
echo
echo -n "Do you want reset to 755 for these directory? (y/n) : "
while true;do
read q
case $q in
"y"|"Y") cd /
for d in $(cat $nofo);do
echo "chmod 755 /$d"
chmod 755 /$d
done
echo "done."
break
;;
"n"|"N") echo "skipped."
break
;;
*) echo -n "please type 'y' or 'n': "
;;
esac
done
fi
rm $inst $remo $nofo
Loris