Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/run/lock permissions drama with kermit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
gemi
n00b
n00b


Joined: 10 Oct 2012
Posts: 31

PostPosted: Wed Jan 28, 2015 6:06 am    Post subject: /run/lock permissions drama with kermit Reply with quote

Hi,

As a user I want kermit to be able to access the serial port. Kermit however needs write permissions to /var/lock -> /run/lock. The file /usr/lib/tmpfiles.d/gentoo-run.conf sets the permissions on that directory to 755 root root which does not allow any non root user to write to that directory.

What is the cleanest way to get kermit working as a user to be able to access serial port? Change the permissions, add the user to a group and change the group on the directory?

Thanks
gemi
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Wed Jan 28, 2015 2:07 pm    Post subject: Re: /run/lock permissions drama with kermit Reply with quote

gemi wrote:
Hi,

As a user I want kermit to be able to access the serial port. Kermit however needs write permissions to /var/lock -> /run/lock. The file /usr/lib/tmpfiles.d/gentoo-run.conf sets the permissions on that directory to 755 root root which does not allow any non root user to write to that directory.

What is the cleanest way to get kermit working as a user to be able to access serial port? Change the permissions, add the user to a group and change the group on the directory?

Thanks
gemi


Kermit (CKermit, anyway) used to keep its locks in /var/spool/uucp, with kermit having uucp as the group owner.
However, running kermit on my current system doesn't show up any lock at all, which is a bit puzzling. There's
another locking mechanism, the lockdev library, that kermit might be using but on my system at least it isn''t
installed. gentoo-run.conf seems to be a systemd file - can you edit it to give the lock directory better permissions?

Will
Back to top
View user's profile Send private message
gemi
n00b
n00b


Joined: 10 Oct 2012
Posts: 31

PostPosted: Wed Jan 28, 2015 10:49 pm    Post subject: Reply with quote

Yes I can change the permissions to 777, and that works fine for the normal users. But is that the right way?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Thu Jan 29, 2015 3:07 pm    Post subject: Reply with quote

I'd probably make the directory 775, owned by root:users, or whatever group your users
belong to.

Will

Later: I''ve checked with a USB/Serial converter, and kermit, with binary permissions root:root
and no suid produces a lock directory /run/lock owned by root:uucp and with permissions 775.
(/var/lock is a soft link to /run/lock). The lock file LCK..ACM0 contains kermit's PID and is owned
by the user and group running kermit (the user is a member of the uucp group) with permissions 444
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum