ubuntu一直没怎么用,今天就因为犯了个小错误郁闷N久,当在执行我的ilan.sh脚本连接网络时出现了下面的错误:
Failed to connect to wpa_supplicant - wpa_ctrl_open: Permission denied
Failed to connect to wpa_supplicant - wpa_ctrl_open: Permission denied
socket(PF_PACKET): Operation not permitted
ioctl[SIOC{ADD/DEL}MULTI]: Operation not permitted
ioctl[SIOCSIFFLAGS]: Permission denied
wpa_driver_wired_init: Failed to enable allmulti
Failed to initialize driver interface
There is already a pid file /var/run/dhclient.pid with pid 5193
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
wmaster0: unknown hardware address type 801
can't create /var/lib/dhcp3/dhclient.leases: Permission denied
wmaster0: unknown hardware address type 801
Open a socket for LPF: Operation not permitted
There is already a pid file /var/run/dhclient.pid with pid 5193
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
wmaster0: unknown hardware address type 801
can't create /var/lib/dhcp3/dhclient.leases: Permission denied
SIOCSIFADDR: Permission denied
SIOCSIFFLAGS: Permission denied
SIOCSIFFLAGS: Permission denied
wmaster0: unknown hardware address type 801
Open a socket for LPF: Operation not permitted
在网上查了好久都没找到是什么原因,最后才发现是因为没有用root权限运行的,==!,所以用sudo ./ilan.sh 便可以执行成功了。