Article View: news.software.readers
Article #54959Re: [SLRN] Running slrnpull as user?
From: Matthew Haley
Date: Tue, 07 Dec 1999 00:00
Date: Tue, 07 Dec 1999 00:00
68 lines
2940 bytes
2940 bytes
On 7 Dec 1999 00:12:38 GMT, homega@ciberia.es (J. Horacio) wrote: > >Why can't I run slrnpull as an ordinary user instead of root? > > >$ slrnpull -d /var/spool/slrnpull -h news.ciberia.es >12/06/1999 23:53:38 ***Unable to open /var/log/news/slrnpull.log for >logging. >12/06/1999 23:53:38 slrnpull started. >12/06/1999 23:53:38 Reading /var/spool/slrnpull/slrnpull.conf >12/06/1999 23:53:38 ***Unable to create directory >/var/spool/slrnpull/news/comp/std/unix. (errno = 13) >12/06/1999 23:53:38 A total of 0 bytes received, 0 bytes sent in 0 >seconds. > >but slrnpull.log belongs to group root, not group news. Is it ok if I >change the group ownership of the file for group news, and then give the >group writing permission, or ...? I wouldn't do that since I'm not too keen on modifying file permissions. I would go for a cron job. Implementation off the top of my head: (UNTESTED) 1) Create a cron entry to run test_do_slrnpull.sh every minute 2) test_do_slrnpull.sh contains: #!/bin/sh if [ -e /home/user/.do_slrnpull ] then rm -f /home/user/.do_slrnpull slrnpull -d /var/spool/slrnpull -h news.ciberia.es fi 3) Create a script do_slrnpull.sh containing: #!/bin/sh if [ -e /home/user/.do_slrnpull ] then exit fi touch /home/user/.do_slrnpull # EOF Now, everytime you wanted to run slrnpull you would instead run do_slrnpull.sh which would cause cron to run it the next time it awoke. BTW, it's been a couple weeks since I've used bash so my test statements may not be completely correct. Just to make sure I suggest checking 'man test' and looking for the correct option to test for a 'regular file'. PS, you could get rid of (2) and just change the cron entry (2) to 'if [ -e /home/user/.do_slrnpull ]; then slrnpull\ blah blah blah... fi' One more note, <g> I chose /home/user/.do_slrnpull so that other users can't just 'touch' you into running multiple instances of slrnpull. Hope that helps, and I am prepared for criticism (constructive or otherwise). ~+----------------------------------+~ | Matthew Haley <mrh99@uswest.net> | ~+----------------------------------+~
Technical Details
Message-ID:
<29gp4s073k0t0uipikhrhbns4aivsrscfl@4ax.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<944525261.122350@cache0-serv>Show Full Headers
Complete Article Headers
Message-ID: <29gp4s073k0t0uipikhrhbns4aivsrscfl@4ax.com> Subject: Re: [SLRN] Running slrnpull as user? Date: Tue, 07 Dec 1999 00:00:00 +0000 From: Matthew Haley <mrh99@uswest.net> References: <944525261.122350@cache0-serv> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 557628372 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Trace: news.uswest.net 944555169 209.180.141.90 (Tue, 07 Dec 1999 02:26:09 CST) Organization: Home MIME-Version: 1.0 NNTP-Posting-Date: Tue, 07 Dec 1999 02:26:09 CST Newsgroups: news.software.readers