linux wget变成000权限

今天使用wget下载文件时出现:-bash: /usr/bin/wget: 权限不够。

查看  /usr/bin/wget 的权限为: ---------- 1 root root 357400 3月  22 2017 /usr/bin/wget

处理方法:

首先想到卸载重装,但失败了

yum erase wget

***********************************

***********************************

执行事务
正在删除 : wget-1.12-10.el6.x86_64 1/1
warning: erase unlink of /usr/bin/wget failed: 不允许的操作
Verifying : wget-1.12-10.el6.x86_64 1/1

删除:
wget.x86_64 0:1.12-10.el6

使用setfacl修改,但硬盘默认没有开启acl,所以也失败了

解决方法:

重新编译安装wget

1、下载wget包:http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz

2、使用rz命令拷入服务器

3、解压

4、编译安装

./configure --with-sll=openssl

make

make install 

默认安装路径在/usr/local/bin/wget,为了方便使用可以设置一个别名

alias wget='/usr/local/bin/wget'

posted @ 2018-07-12 17:51  phimo  阅读(504)  评论(0编辑  收藏  举报