PermissionError when starting timekprd

Asked by Alexnader Karenin

sudo /etc/init.d/timekpr start
timekpr | * Starting TimeKeeper ...
timekpr |Traceback (most recent call last):
timekpr | File "/usr/lib/python3/dist-packages/timekpr/server/timekprd.py", line 28, in <module>
timekpr | if misc.checkAndSetRunning(os.path.splitext(os.path.basename(__file__))[0]):
timekpr | File "/usr/lib/python3/dist-packages/timekpr/common/utils/misc.py", line 118, in checkAndSetRunning
timekpr | with open(pidFile, "w") as pidfile:
timekpr |PermissionError: [Errno 13] Permission denied: '/tmp/timekprd.pid'
timekpr | * start-stop-daemon: failed to start `/usr/bin/timekprd' [ !! ]
timekpr | * ERROR: timekpr failed to start

I have Arch with OpenRC and am trying to start the app. As I figured out it has to be a simple "sevice" that just launches the script located in /usr/bin...
But I have the error listed above.

I really can't understand a) why PID file is located in TMP and b) how to redefine that dir.... I can touch files in /tmp with each and every user possible so it is definitely not a permission issue but a python code.

THX for helping with that.

Question information

Language:
English Edit question
Status:
Solved
For:
Timekpr-nExT Edit question
Assignee:
Eduards Bezverhijs Edit question
Solved by:
Alexnader Karenin
Solved:
Last query:
Last reply:
Revision history for this message
Alexnader Karenin (hellkaim) said (last edit ):
#1

Ok. I can mark it as closed.
For whatever reason on my particular system sudo is not enough to start timekprd.
So the su has to be used.

More over. Removing unused packages and re-installation of timekpr-next WITH reboot helped.

So now it is running as expected and even under open-rc I can use the app with elogin and dbus.

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#2

Good to hear it's working, it seems that even login1 is present and working, that's news for me :)

Does everythings works as expected? Is time counting, inactive time too and certain accounts get logged out properly?

Revision history for this message
Alexnader Karenin (hellkaim) said :
#3

Yes!
As mentioned, I do not have systemd only open-rc and elogin but DBUS is fully functional.
Time tracking is working fine: the app detects when the user session is locked and counts correctly running applications when the session is active.

I think the issue I faced might be due to some PATH related issues. But it is clear I needed a reboot. Any way thanks for a grate app!