smartctl: permission denied ?

Lors de l’exécution de smartctl, on rencontre parfois l’erreur suivante sur certains serveurs fraîchement installés :

-bash: /usr/sbin/smartctl: Permission denied

Pourtant, smartmontools est bien installé sur le serveur :

# dpkg -l | grep smartmontools
ii  smartmontools                   5.39.1+svn3124-2             control and monitor storage systems using S.M.A.R.T.

et smartctl existe bien :

# find / -name smartctl
/usr/sbin/smartctl

Il suffit de réinstaller smartmontools pour fixer ce problème :

# apt-get install --reinstall smartmontools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 441 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://debian.bhs.mirrors.ovh.net/debian/ squeeze/main smartmontools amd64 5.39.1+svn3124-2 [441 kB]
Fetched 441 kB in 0s (8,729 kB/s)     
(Reading database ... 32558 files and directories currently installed.)
Preparing to replace smartmontools 5.39.1+svn3124-2 (using .../smartmontools_5.39.1+svn3124-2_amd64.deb) ...
Unpacking replacement smartmontools ...
Processing triggers for man-db ...
Setting up smartmontools (5.39.1+svn3124-2) ...

Et on peut vérifier que smartctl fonctionne avec la commande suivante :

# smartctl -V
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

smartctl comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
the terms of the GNU General Public License Version 2.
See http://www.gnu.org for further details.

smartmontools release 5.40 dated 2009-12-09 at 21:00:32 UTC
smartmontools SVN rev 3124 dated 2010-07-12 at 19:21:00
smartmontools build host: x86_64-unknown-linux-gnu
smartmontools build configured: 2010-12-26 11:52:46 UTC
smartctl compile dated Dec 26 2010 at 11:53:03
smartmontools configure arguments:  '--prefix=/usr' '--sysconfdir=/etc' '--mandir=/usr/share/man' '--with-initscriptdir=/etc/init.d' '--with-docdir=/usr/share/doc/smartmontools' '--enable-drivedb' '--enable-savestates' '--enable-attributelog' '--with-savestates=/var/lib/smartmontools/smartd.' '--with-attributelog=/var/lib/smartmontools/attrlog.' '--with-selinux' 'CXXFLAGS=-g -O2' 'LDFLAGS=' 'CPPFLAGS=' 'CFLAGS=-g -O2 -fsigned-char -Wall -O2'