Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[leafnode] news user home directory

9 views
Skip to first unread message

_JusSx_

unread,
Dec 13, 2009, 7:33:37 AM12/13/09
to
Hi,
yesterday I installed leafnode on my gentoo linux system. I set up
cron for running fetchnews every hour and so on. It worked and It
works very well but I found that something is wrong in my system
configuration.
Sometimes fetchnews reports this error:

#v+
Could not chdir to HOME dir "/usr/lib/news": No such file or directory
#v-

I gave a look at /etc/passwd and I found out that gentoo linux system
sets news user home directory to /usr/lib/news. However leafnode
installation script doesn't create /usr/lib/news but /var/lib/news and
/var/spool/news.

So I'm wondering what directory is the user news' home. Which one
should I use?
Of course I don't think it exists a standard, but I Would like to know
your opinion.
Thank in advance
_JusSx?

--
Linux is only free if your time has no value

Mike Yetto

unread,
Dec 13, 2009, 10:55:22 AM12/13/09
to
Bada bing _JusSx_ <ju...@gmail.com> bada bang:

> Hi,
> yesterday I installed leafnode on my gentoo linux system. I set up
> cron for running fetchnews every hour and so on. It worked and It
> works very well but I found that something is wrong in my system
> configuration.
> Sometimes fetchnews reports this error:
>
> #v+
> Could not chdir to HOME dir "/usr/lib/news": No such file or directory
> #v-
>
> I gave a look at /etc/passwd and I found out that gentoo linux system
> sets news user home directory to /usr/lib/news. However leafnode
> installation script doesn't create /usr/lib/news but /var/lib/news and
> /var/spool/news.
>

I'm running (K)Ubuntu, but that may not matter for this answer.
That said, my /etc/passwd shows /var/spool/news as the home for
news.

> So I'm wondering what directory is the user news' home. Which one
> should I use?
> Of course I don't think it exists a standard, but I Would like to know
> your opinion.

It shouldn't cause any irreparable harm to change it, so it's
worth a try.

Mike "feedback would be nice" Yetto
--
In theory, theory and practice are the same.
In practice they are not.

Message has been deleted

Mike Yetto

unread,
Dec 13, 2009, 1:22:37 PM12/13/09
to
Bada bing houghi <hou...@houghi.org.invalid> bada bang:

> Mike Yetto wrote:
>> I'm running (K)Ubuntu, but that may not matter for this answer.
>> That said, my /etc/passwd shows /var/spool/news as the home for
>> news.
>
> My openSUSE has the following in passwd:
> news:x:9:13:News system:/etc/news:/bin/bash
>
> So best is to check passwd, see what it has there (if anything)
>

The OP already stated that the home for "news" is "/usr/lib/news"
but that directory does not exist, while "/var/lib/news" and
"/var/spool/news" do. Suggesting he use one of these, rather
than another directory, seems to be something worth trying.

Mike "following the entire discussion is also worth tryng" Yetto

Moe Trin

unread,
Dec 13, 2009, 1:25:14 PM12/13/09
to
On Sun, 13 Dec 2009, in the Usenet newsgroup news.software.readers, in article
<200912131...@usenet.piggo.com>, _JusSx_ wrote:

>Sometimes fetchnews reports this error:
>
>#v+
>Could not chdir to HOME dir "/usr/lib/news": No such file or directory
>#v-
>
>I gave a look at /etc/passwd and I found out that gentoo linux system
>sets news user home directory to /usr/lib/news. However leafnode
>installation script doesn't create /usr/lib/news but /var/lib/news and
>/var/spool/news.

From the Filesystem Hierarchy Standard from http://www.pathname.com/fhs/

-------
/usr/lib : Libraries for programming and packages

Purpose

/usr/lib includes object files, libraries, and internal binaries that
are not intended to be executed directly by users or shell scripts. [22]

Applications may use a single subdirectory under /usr/lib. If an
application uses a subdirectory, all architecture-dependent data
exclusively used by the application must be placed within that
subdirectory. [23]
-------

Now clearly, the /usr/lib/news isn't meant to be a _home_ directory.

>So I'm wondering what directory is the user news' home. Which one
>should I use?

Your system - your rules. ;-)

>Of course I don't think it exists a standard, but I Would like to know
>your opinion.

I'm not using Gentoo, nor leafnode, but you have two alternatives.
You can create the non-standard /usr/lib/news - and no Linux police
will come to your door to arrest you. Or you could tell leafnode
to use another directory. I've got slrn (slrnpull) using
/var/spool/slrnpull as it's home, and there is a
/var/spool/slrnpull/bin/ for some of the extra tools I use with that
application. /var/lib is meant for

/var/lib : Variable state information

and /var/spool for

/var/spool : Application spool data

so it's your choice.

Old guy

_JusSx_

unread,
Dec 13, 2009, 2:08:27 PM12/13/09
to

I fixed the problem by changing news home directory from /usr/lib/news
to /var/spool/news in /etc/passwd. Now It works great. I wrote an
email to leafnode gentoo ebuild mantainter and I showed the problems.

I suggested:

1) if gentoo system requires news home directory to be /usr/lib/news,
leafnode ebuild should create that directory, at least;

2) if gentoo system does't require new home directory to be
/usr/lib/news, gentoo system could provide /var/spool/news directory
as default user home directory;

I like /var/spool/news to be default news user home directory.

However, I would like to thank you very much for your post.
_JusSx_

»Q«

unread,
Dec 13, 2009, 3:28:02 PM12/13/09
to
In <news:200912131...@usenet.piggo.com>,
_JusSx_ <ju...@gmail.com> wrote:

> > On Sun, 13 Dec 2009, in the Usenet newsgroup news.software.readers,
> > in article
> ><200912131...@usenet.piggo.com>, _JusSx_ wrote:
> >
> >>Sometimes fetchnews reports this error:
> >>
> >>#v+
> >>Could not chdir to HOME dir "/usr/lib/news": No such file or
> >>directory #v-
> >>
> >>I gave a look at /etc/passwd and I found out that gentoo linux
> >>system sets news user home directory to /usr/lib/news. However
> >>leafnode installation script doesn't create /usr/lib/news
> >>but /var/lib/news and /var/spool/news.

[giant snip]

> I fixed the problem by changing news home directory from /usr/lib/news
> to /var/spool/news in /etc/passwd. Now It works great. I wrote an
> email to leafnode gentoo ebuild mantainter and I showed the problems.
>
> I suggested:
>
> 1) if gentoo system requires news home directory to be /usr/lib/news,
> leafnode ebuild should create that directory, at least;
>
> 2) if gentoo system does't require new home directory to be
> /usr/lib/news, gentoo system could provide /var/spool/news directory
> as default user home directory;
>
> I like /var/spool/news to be default news user home directory.
>
> However, I would like to thank you very much for your post.
> _JusSx_

I'm glad it's working for you now. I have the same situation with the
news user's $HOME not existing, but leafnode doesn't throw any errors
for me. It may be because I'm using one of the leafnode 2 alphas (now
removed from Gentoo's tree due to leafnode's we-never-release policy).
I would have thought that leafnode would work ok even with no $HOME for
news.

If you hear back from Gentoo's leafnode maintainer, please post back
here.

Frank Slootweg

unread,
Dec 13, 2009, 3:43:28 PM12/13/09
to
Moe Trin <ibup...@painkiller.example.tld.invalid> wrote:
[...]

> From the Filesystem Hierarchy Standard from http://www.pathname.com/fhs/

That's a *Linux* 'standard'. UNIX systems have real/de jure standards,
like the XPG. leafnode is UNIX software, not Linux-only software.

Granted, the *OP's* question is asked in a Linux context, but you
can't blame *leafnode* for not being Linux-centric.

> -------
> /usr/lib : Libraries for programming and packages
>
> Purpose
>
> /usr/lib includes object files, libraries, and internal binaries that
> are not intended to be executed directly by users or shell scripts. [22]
>
> Applications may use a single subdirectory under /usr/lib. If an
> application uses a subdirectory, all architecture-dependent data
> exclusively used by the application must be placed within that
> subdirectory. [23]
> -------
>
> Now clearly, the /usr/lib/news isn't meant to be a _home_ directory.

I disagree. /usr/lib/news is quite a reasonable home directory of the
user news, which is the News administrator. IIRC INN uses that on XPG
compliant systems. Also tin(5) mentions /usr/lib/news as one of the
common places for things like the active file, newsgroups file, etc.,
i.e. for systems with a local News spool, which is exactly what we're
talking about here.

Anyway, whatever you choose, it should *not* be .../spool/..., because
it's *not* a spool directory.

[...]

[Ugly abberation ../spool/bin deleted! :-)]

Frank Slootweg

unread,
Dec 13, 2009, 4:25:04 PM12/13/09
to
A little earlier I wrote:
[...]

> IIRC INN uses that [/usr/lib/news] on XPG compliant systems.

I just checked. The current versions of INN use /usr/local/news as
the default ~news.

But that point is moot, because AFAICT, that also does not conform to
the Filesystem Hierarchy Standard, because that says:

> /usr is the second major section of the filesystem. /usr is shareable,
> read-only data. That means that /usr should be shareable between
> various FHS-compliant hosts and must not be written to. Any
> information that is host-specific or varies with time is stored
> elsewhere.

But for INN /usr/local/news is not shareable and not read-only.

So it looks like INN also ignores the Filesystem Hierarchy 'Standard',
and rightfully so.

[...]

Moe Trin

unread,
Dec 13, 2009, 8:28:03 PM12/13/09
to
On 13 Dec 2009, in the Usenet newsgroup news.software.readers, in article
<7ol1vgF...@mid.individual.net>, Frank Slootweg wrote:

>Moe Trin <ibup...@painkiller.example.tld.invalid> wrote:

>> From the Filesystem Hierarchy Standard from http://www.pathname.com/fhs/

> That's a *Linux* 'standard'. UNIX systems have real/de jure standards,
>like the XPG. leafnode is UNIX software, not Linux-only software.

> Granted, the *OP's* question is asked in a Linux context, but you
>can't blame *leafnode* for not being Linux-centric.

I'm so glad you noticed that. You may also be aware that Linux, like
Cygwin, is not a branded UNIX. Did you also miss the part where I wrote

Your system - your rules.

> I disagree.

That's your privilege - but I'm answering the question in that Linux
context. Would you also like to discuss the POSIX end of things? I
see no need, as the question was not asked in that context either.

>[Ugly abberation ../spool/bin deleted! :-)]

You may want to get your eyes checked, as that was not what I wrote.
Perhaps you aren't used to seeing bin directories in a user's home
directory. It's a good place to put applications that are created by,
and only used by that individual.

Old guy

Frank Slootweg

unread,
Dec 14, 2009, 7:06:16 AM12/14/09
to
Moe Trin <ibup...@painkiller.example.tld.invalid> wrote:

Hi Moe,

I'm sorry if you got the impression that I think you were 'wrong'. I
just gave my opinion. Because there is only one real standard and even
that isn't cast in stone, it's (IMO :-)) all a matter op opinion.

> On 13 Dec 2009, in the Usenet newsgroup news.software.readers, in article
> <7ol1vgF...@mid.individual.net>, Frank Slootweg wrote:
>
> >Moe Trin <ibup...@painkiller.example.tld.invalid> wrote:
>
> >> From the Filesystem Hierarchy Standard from http://www.pathname.com/fhs/
>
> > That's a *Linux* 'standard'. UNIX systems have real/de jure standards,
> >like the XPG. leafnode is UNIX software, not Linux-only software.
>
> > Granted, the *OP's* question is asked in a Linux context, but you
> >can't blame *leafnode* for not being Linux-centric.
>
> I'm so glad you noticed that. You may also be aware that Linux, like
> Cygwin, is not a branded UNIX.

Yeah, I'm somewhat aware of that! :-)

> Did you also miss the part where I wrote
>
> Your system - your rules.

No, I saw that.

> > I disagree.
>
> That's your privilege - but I'm answering the question in that Linux
> context. Would you also like to discuss the POSIX end of things? I
> see no need, as the question was not asked in that context either.
>
> >[Ugly abberation ../spool/bin deleted! :-)]
>
> You may want to get your eyes checked, as that was not what I wrote.
> Perhaps you aren't used to seeing bin directories in a user's home
> directory. It's a good place to put applications that are created by,
> and only used by that individual.

Again, I saw what you wrote. Yes, a bin subdirectoty of ~user is fine.
I use that myself (well, local/bin). But a bin subdirectory of a spool
directory is too much for my taste. But that's a result of having a
spool directory as ~user. I wouldn't use that. But again, just a matter
of opinion.

Whiskers

unread,
Dec 15, 2009, 2:50:18 PM12/15/09
to
On 2009-12-13, Frank Slootweg <th...@ddress.is.invalid> wrote:
> Moe Trin <ibup...@painkiller.example.tld.invalid> wrote:

[...]

> Anyway, whatever you choose, it should *not* be .../spool/..., because


> it's *not* a spool directory.
>
> [...]
>
> [Ugly abberation ../spool/bin deleted! :-)]

I'm not claiming that it's "correct" (or isn't), but Mandriva seem to think
a spool directory is fine for a non-human's $HOME:

# grep spool passwd
lp:x:4:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:12:mail:/var/spool/mail:/bin/sh
news:x:9:13:news:/var/spool/news:/bin/sh
uucp:x:10:14:uucp:/var/spool/uucp:/bin/sh
postfix:x:75:75:system user for postfix:/var/spool/postfix:/bin/false
#


--
-- ^^^^^^^^^^
-- Whiskers
-- ~~~~~~~~~~

0 new messages