1. 程式人生 > >linux下wget沒有許可權bash: /usr/bin/wget: Permission denied

linux下wget沒有許可權bash: /usr/bin/wget: Permission denied

打算使用wget下載hadoop的壓縮包,結果報下面的錯誤:[[email protected] mnt] wget http: mirror cnop net nagios nagios-plugins-1 4 14

打算使用wget下載hadoop的壓縮包,結果報下面的錯誤:

[[email protected] mnt]# wget http://mirror.cnop.net/nagios/nagios-plugins-1.4.14.tar.gz

-bash: /usr/bin/wget: Permission denied

root賬號還報許可權錯誤,還是頭一次見。

檢視wget的許可權列表

[[email protected] bin]# ls -l wget
-rw-r--r-- 1 root root 364072 Feb 11 2014 wget

沒有X,給root賬號加上可執行許可權:

[[email protected] mnt]# chmod +x /usr/bin/wget
chmod: changing permissions of `/usr/bin/wget': Operation not permitted

暈,沒有chmod許可權。

然後就是各種google……

原來是加上了不可修改的屬性:

[[email protected] bin]# lsattr wget
----i--------e- wget

去掉i屬性:

[[email protected] bin]# chattr -i wget

給root加上可執行許可權:

[[email protected] mnt]# chmod +x /usr/bin/wget

再來執行wget命令:

 

正常了。