mechevere / picocom

Automatically exported from code.google.com/p/picocom
GNU General Public License v2.0
0 stars 0 forks source link

Unable to create lock file #19

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use picocom to connect to a serial device (/dev/ttyUSB1)
2.
3.

What is the expected output? What do you see instead?
Expected: picocom opens the serial port for reading/writing
Actual: "FATAL: cannot lock /dev/ttyUSB1: Permission denied"

What version of the product are you using? On what operating system?
picocom 1.7-1, Arch Linux 3.4.6-1

Please provide any additional information below.
/var/lock is now a symlink to /run/lock, which is root:root 0755. A regular 
user would not be able to create a lockfile in /run/lock, which it seems 
picocom is trying to do. Works fine with the --nolock option or if I manually 
change the permissions of /run/lock (but that does not persist after reboot).

Original issue reported on code.google.com by andrewda...@gmail.com on 25 Jul 2012 at 9:54

GoogleCodeExporter commented 9 years ago
I wouldn't say this is picocom's problem, but rather distro specific.
You just need to teach your systemd to create /run/lock with write permission
to the lock group and then add your user to the lock group.
This is done here, afaik, /usr/lib/tmpfiles.d/legacy.conf [1]

I guess we could patch picocom to use lockdev, but it would add a depedency :(

[1] https://bbs.archlinux.org/viewtopic.php?pid=1116827

Original comment by ezequ...@vanguardiasur.com.ar on 8 Mar 2014 at 1:07