daemon user needs shell?

User avatar
TauTau
BANNED_USERS
BANNED_USERS
Posts: 13
Joined: 15 May 2013, 14:18

daemon user needs shell?

Postby TauTau » 15 May 2013, 15:01

Hi,

I came across something I don't quite understand. While implementing ttrss on my root server, I used the init script from here http://noctus.net/2012/initscript-mit-tiny-tiny-rss-1-5-10. I got errors about a not found .stamp file in the lock directory. There is a .lock file in the directory, so the process (which is running, I could verify that) was able to create *that* file. However, only when I gave the user the daemon runs under a shell, ttrss started to update feeds.
So why is the update process able to create the .lock file, but not the .stamp file (I couldn't see if it really creates the file, it just wasn't able to *find* one from the error message)? I'd really prefer the http users to not have a login shell ;)

User avatar
TauTau
BANNED_USERS
BANNED_USERS
Posts: 13
Joined: 15 May 2013, 14:18

Re: daemon user needs shell?

Postby TauTau » 15 May 2013, 15:27

ok, seems that didn't solve it. The user now has a bash entry in /etc/passwd, the ttrss and lock directory have permissions 777 (not good), and I still get

E_WARNING (2) include/functions.php:2136 file_get_contents(lock/update_daemon.stamp): failed to open stream: No such file or directory

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: daemon user needs shell?

Postby fox » 15 May 2013, 15:34

Hello I can't linux, and

User avatar
TauTau
BANNED_USERS
BANNED_USERS
Posts: 13
Joined: 15 May 2013, 14:18

Re: daemon user needs shell?

Postby TauTau » 15 May 2013, 15:43

did another test... su'ed to the user it should run with, changed to the ttrs directory, and ran

php ./update_daemon2.php

when there is a thread spawned:

[MASTER] spawned client 0

I get directly after that:

sh: /php: not found

what does that mean?

Edit: Same Error comes with "php ./update.php --daemon"

User avatar
blainemono
Gaping Anus of Eternity
Gaping Anus of Eternity
Posts: 246
Joined: 05 Jun 2009, 18:13

Re: daemon user needs shell?

Postby blainemono » 15 May 2013, 15:44

Did you grep the kernel daemon? It's a bit wonky when not grepped.

User avatar
TauTau
BANNED_USERS
BANNED_USERS
Posts: 13
Joined: 15 May 2013, 14:18

Re: daemon user needs shell?

Postby TauTau » 15 May 2013, 16:01

joking? What should a grep to a kernel daemon do? And which daemon?

Just to clarify this a bit, I'm a fulltime server admin, so I usually know my way around a system, just php is not my kind of beef ;)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: daemon user needs shell?

Postby fox » 15 May 2013, 16:06

>I'm a fulltime server admin

User avatar
TauTau
BANNED_USERS
BANNED_USERS
Posts: 13
Joined: 15 May 2013, 14:18

Re: daemon user needs shell?

Postby TauTau » 15 May 2013, 16:07

so, running "php ./update.php --feeds" seems to work, it's just the daemon part not working. If it was a shell script, I could debug it...

User avatar
blainemono
Gaping Anus of Eternity
Gaping Anus of Eternity
Posts: 246
Joined: 05 Jun 2009, 18:13

Re: daemon user needs shell?

Postby blainemono » 15 May 2013, 16:10

Is your daemon plugged in correctly? Try reversing the polarities.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: daemon user needs shell?

Postby fox » 15 May 2013, 16:10

Don't do that, it will tear your server apart!

User avatar
blainemono
Gaping Anus of Eternity
Gaping Anus of Eternity
Posts: 246
Joined: 05 Jun 2009, 18:13

Re: daemon user needs shell?

Postby blainemono » 15 May 2013, 16:11

Well he has the full of the time to admin it back to life!

User avatar
TauTau
BANNED_USERS
BANNED_USERS
Posts: 13
Joined: 15 May 2013, 14:18

Re: daemon user needs shell?

Postby TauTau » 15 May 2013, 16:14

why is this forum called "support", instead of "home of the drunks"?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: daemon user needs shell?

Postby fox » 15 May 2013, 16:15

Ultimately it's the same thing.

User avatar
blainemono
Gaping Anus of Eternity
Gaping Anus of Eternity
Posts: 246
Joined: 05 Jun 2009, 18:13

Re: daemon user needs shell?

Postby blainemono » 15 May 2013, 16:16

Hello. My name is Blaine an I am an alchoholic.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: daemon user needs shell?

Postby fox » 15 May 2013, 16:17

blainemono wrote:Hello. My name is Blaine an I am an alchoholic.


I have bad news, buddy. Not only you are an alcoholic, there's a slight case of being eternity's gaping anus.


Return to “Comedy bistro”

Who is online

Users browsing this forum: No registered users and 1 guest