You are not logged in.

#1 2012-06-15 17:39:29

lesto
Member
Registered: 2010-07-13
Posts: 115

permission on /run/lock

hi,
i need to use the serial as user, so i've run "chmod o+rwx /run/lock ".
But after every reboot, the permission turn to change back to default.

It is normal? and why it is happening?

Offline

#2 2012-06-15 17:48:49

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,533
Website

Re: permission on /run/lock

I don't understand the purpose of this, and I don't know if it would be a good idea ... but isn't /run recreated at boot in memory only?

If so you'd have to change the permissions after boot, perhaps in rc.local (again, I have no idea if this is a safe or good idea).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-06-15 19:08:23

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: permission on /run/lock

the purpose of this is to use the serial as user.
with old /var/lock the permission was keep.. i wan't to understand why now they change

Offline

#4 2012-06-15 19:33:32

progandy
Member
Registered: 2012-05-17
Posts: 5,199

Re: permission on /run/lock

Isn't it enough to create a subdirectory with the correct access rights? Then create it in /etc/rc.local  (sysvinit) or use /etc/tmpfiles.d/ (AFAIK systemd only)
The /run directory exists only in your main memory, so it has to be created at boottime.

Last edited by progandy (2012-06-15 19:35:30)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2012-06-15 19:46:24

lesto
Member
Registered: 2010-07-13
Posts: 115

Re: permission on /run/lock

ah ok, i don't thinks it is enougt to create the folder, i'm using an externelò lib, and i don't lnow if it support something similar.
Also this serial is over USB, so it's a little bit hard to know what USB nuber it will use

Offline

#6 2012-06-15 20:14:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: permission on /run/lock

Sysvinit users get tmpfiles too. The only difference is the lack of a --clean action that systems users get periodically via a timer unit. /run/lock is going to be created via this mechanic. Not happy with the perms? Override the file from /usr/lib/tmpfiles.d in /etc/tmpfiles.d

Offline

#7 2012-06-15 20:16:09

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: permission on /run/lock

/run/lock is created on boot by /usr/lib/tmpfiles.d/legacy.conf (both on systemd and initscripts). To overwrite it, simply copy the file to /etc/tmpfiles.d/ and edit it there. There should be a manpage to explain how it works, but in your case I guess you simply want to change the perms "0755" into whatever you need.

Offline

Board footer

Powered by FluxBB