🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #73880

Re: should permissions be news and not root

#73880
From: Black Dragon
Date: Thu, 20 Jul 2006 14:18
78 lines
4163 bytes
rob wrote:

> root@xstation.abcd.net (Cron Daemon)
> To: rob@xstation.4096.net
> Subject: Cron <rob@xstation> suck nntp.aioe.org -A -bp -hl
> localhost -c -i 200 -M -n -Q
> X-Cron-Env: <SHELL=/bin/sh>
> X-Cron-Env: <HOME=/home/rob>
> X-Cron-Env: <PATH=/usr/bin:/bin>
> X-Cron-Env: <LOGNAME=rob>
> Message-Id: <20060719100450.BD8C6391C1E@xstation.4096.net>
> Date: Wed, 19 Jul 2006 11:04:50 +0100 (BST)

> Invalid default read for new active group, must be <= 0
> Attempting to connect to nntp.aioe.org
> Using Port 119
> Official host name: nntp.aioe.org
> Address: 81.174.50.80
> Connected to nntp.aioe.org

> and at the end :


> /etc/suck/sucknewsrc: Permission denied
> Moving newsrc to backup: Permission denied

Since you're running suck as "rob", "rob" needs to have read and write
permissions in your /etc/suck directory and the files in it. In a
previous post you listed those as being owned by and read/writable by
news.

<quote>
drwxrwxr-x  2 news news 4096 2006-06-30 17:16 .
-rw-r--r--  1 news news  122 2006-07-05 11:15 sucknewsrc
-rw-rw-r--  1 news news  124 2004-10-27 13:37 sucknewsrc.old
</quote>

You need to either fix the permissions on that directory and the those
file so rob can read and write to it. Or better yet, use the -dd option 
(see the suck(1) man page) to define a directory rob does have read / 
write permission in. ( $HOME/.suck perhaps?)

Personally, I run suck as the news user and used modified (by me) versions
of the get.news.inn script supplied with the suck source to both download
and post from/to several different servers.

Suck was built, installed, and is owned by root and is run by news;

bd@thor> ls -l /usr/local/bin/suck
-r-xr-xr-x  1 root  wheel  127416 Jan 19 20:16 /usr/local/bin/suck
bd@thor> ls -l /usr/local/bin/testhost
-r-xr-xr-x  1 root  wheel  18616 Jan 19 20:16 /usr/local/bin/testhost
bd@thor> ls -l /usr/local/bin/rpost
-r-xr-xr-x  1 root  wheel  26904 Jan 19 20:16 /usr/local/bin/rpost

The header of the /usr/local/share/examples/suck/get.news.inn file
supplied with the suck source;

<quote>
#!/bin/sh

#BEFORE USING - check to ensure all the paths defined below are
correct!!

#NOTE: this script probably needs to be run by root.  Most systems will
# not let a normal user run ctlinnd
</quote>

You should run programs as root only when absolutely necessarily. Since
ctlinnd is owned and run by the news user, why not run suck as the news
user too to keep things as simple as possible too?

-- 
Black Dragon

How can you say that the world isn't
Jewish, when the sun's real name is Sol?
Technical Details
Message-ID: <slrnebv46d.2odn.bd@bdhi.local>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!208.49.83.154.MISMATCH!atl-c08.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!fe24.usenetserver.com.POSTED!21bd460e!not-for-mail
References: <1153141206.278388.106730@m79g2000cwm.googlegroups.com> <e9j43v$374$1@smilodon.ecp.fr> <1153256041.036971.98240@s13g2000cwa.googlegroups.com> <s0cvg.416584$Fs1.145194@bgtnsc05-news.ops.worldnet.att.net> <e9jkcq$8ga$1@smilodon.ecp.fr> <QXlvg.420008$Fs1.162744@bgtnsc05-news.ops.worldnet.att.net> <1153303000.311206.146590@s13g2000cwa.googlegroups.com> <ZVtvg.149209$mF2.48245@bgtnsc04-news.ops.worldnet.att.net> <1153331412.866857.117410@h48g2000cwc.googlegroups.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrnebv46d.2odn.bd@bdhi.local>
Subject: Re: should permissions be news and not root
Date: Thu, 20 Jul 2006 14:18:53 +0000
From: Black Dragon <bd@nomail.invalid>
References: <1153141206.278388.106730@m79g2000cwm.googlegroups.com> <e9j43v$374$1@smilodon.ecp.fr> <1153256041.036971.98240@s13g2000cwa.googlegroups.com> <s0cvg.416584$Fs1.145194@bgtnsc05-news.ops.worldnet.att.net> <e9jkcq$8ga$1@smilodon.ecp.fr> <QXlvg.420008$Fs1.162744@bgtnsc05-news.ops.worldnet.att.net> <1153303000.311206.146590@s13g2000cwa.googlegroups.com> <ZVtvg.149209$mF2.48245@bgtnsc04-news.ops.worldnet.att.net> <1153331412.866857.117410@h48g2000cwc.googlegroups.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!208.49.83.154.MISMATCH!atl-c08.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!fe24.usenetserver.com.POSTED!21bd460e!not-for-mail
Newsgroups: news.software.nntp
Organization: Black Dragon Heavy Industries
Lines: 77
X-No-Archive: yes
User-Agent: slrn/0.9.8.1 (FreeBSD)
X-Complaints-To: abuse@usenetserver.com
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly.
NNTP-Posting-Date: Thu, 20 Jul 2006 10:20:02 EDT