红联Linux门户
Linux帮助

ubuntu12.04 kermit权限配置

发布时间:2016-03-17 15:19:50来源:linux网站作者:igouwa

安装完kermit后,每次直接执行kermit都会提示“/dev/ttyUSB0: Permission denied”:

gouwa@lurk:~$ kermit 
?OpenSSL libraries do not match required version: 
C-Kermit built with OpenSSL 1.0.0e 
Version found  OpenSSL 1.0.1 14
OpenSSL versions prior to 1.0.0 must be the same. 
Set LD_LIBRARY_PATH for OpenSSL 1.0.0e 
Or rebuild C-Kermit from source on this computer to make versions agree. 
C-Kermit makefile target: linux+krb5+openssl 
Or if that is what you did then try to find out why 
the program loader (image activator) is choosing a 
different OpenSSL library than the one specified in the build. 
All SSL/TLS features disabled. 

/dev/ttyUSB0: Permission denied # 这里提示权限问题 
?SET SPEED has no effect without prior SET LINE 
Sorry, you must SET LINE or SET HOST first 
C-Kermit 9.0.302 OPEN SOURCE:, for Linux+SSL+KRB5 (64-bit) 
Copyright (C), 
Trustees of Columbia University in the City of New York. 
Type ? or HELP for help. 
(/home/gouwa/) C-Kermit> 


查看串口设备文件后发现,/dev/ttyUSB0是属于root用户,dialout组:

crw-rw---- 1 root dialout 188, 0 Sep 24 10:03 /dev/ttyUSB0 
gouwa@lurk:~$

因此,这里的默认用户(gouwa)是没有权限打开的。解决办法很简单,就是把你的用户
添加到组dialout就行了:

gouwa@lurk:~$ sudo usermod -a -G dialout gouwa 


然后,重新logout注销一下,再重新登入就可以直接使用kermit了。

当然,也可以通过如下方式修改设备文件的UID:

gouwa@lurk:~$ sudo chown gouwa /dev/ttyUSB0 

这样修改的弊端就是,每次开机都要手动设置一遍,而且,插拔串口后也要重新设置。


附,kermrc配置文件:

gouwa@lurk:~$ cat .kermrc  
set line /dev/ttyUSB0 
set speed 115200 
set carrier-watch off 
set handshake none 
set flow-control none 
robust 
set file type bin 
set file name lit 
set rec pack 1000 
set send pack 1000 
set window 5 

gouwa@lurk:~$


本文永久更新地址:http://www.linuxdiyf.com/linux/19018.html