🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89693

Re: innd: SERVER cant open /var/www/inn/inn_status.html: Permission denied

#89693
From: Russ Allbery
Date: Thu, 06 Oct 2022 04:14
46 lines
3478 bytes
Jeffery Small <jefferysmall@gmail.com> writes:

> Just happened to still be at my desk.  I did su to news and I am able to
> create a new file in the /var/www/inn directory and append to the
> inn_status.html file, so there is no Linux permission problem.  If I can
> do that, why can't the service programs?

Okay, then it's some sort of security control related to the service
startup.  It's not immediately jumping out to me in the service unit,
though.  Do you have SELinux or AppArmor or anything like that enabled?
(Ubuntu, so AppArmor is probably more likely.  I don't know if INN has
AppArmor rules, though.)

For the record, the reason for all this is that Linux now supports
limiting what a service can access so that if there's a security
vulnerability in the service, it doesn't compromise your whole system.
It's in general a very good thing (particularly for fairly old C code like
INN) and it makes Linux systems way more secure, but like every security
measure there's a usability trade-off and some amount of faffing about
trying to figure out where the security rule blocking the thing that the
service needs to do is.

In this case, I'm pretty sure the symlink to a different file system is
the root of the problem, I'm just not sure how.

> I still have the xauth problem and, as news, cannot edit the file with
> vim.  I fixed the problem for root by removing the existing .Xauthority
> file in my home directory and at /.  I see root now has a new home
> directory!  I also found an .Xauthority file in the news home directory
> (/var/spool/news) and eliminated that, but that didn't fix the problem.
> Still looking.....

For some reason all the editors you're using including vim are trying to
connect to your X display, I think.  One thing to try would be to unset
the DISPLAY environment variable before trying to edit the file, which
should hopefully clue in editors that support either using X or not that
there's no X display they have access to.

It's possible that your vim actually ended up being vim-gtk3 or something
during the upgrade.

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87o7upvb9c.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <1fa7c51d-79c0-4411-bb01-1a01bc6ea891n@googlegroups.com> <874jwjsj66.fsf@hope.eyrie.org> <b6710de6-919f-4331-a663-b18eaed4346an@googlegroups.com> <87r0znqzj9.fsf@hope.eyrie.org> <f129b02c-cd9c-409d-b88f-8053d62f14e2n@googlegroups.com> <87edvnqqvz.fsf@hope.eyrie.org> <aecf2f19-92ee-4c4f-9334-763ad2375d0bn@googlegroups.com> <87tu4hvd23.fsf@hope.eyrie.org> <82780217-dd2d-4931-9d84-4d0b01cb7090n@googlegroups.com>

Show Full Headers
Complete Article Headers
Message-ID: <87o7upvb9c.fsf@hope.eyrie.org>
Subject: Re: innd: SERVER cant open /var/www/inn/inn_status.html: Permission denied
Date: Wed, 05 Oct 2022 21:14:55 -0700
From: Russ Allbery <eagle@eyrie.org>
References: <1fa7c51d-79c0-4411-bb01-1a01bc6ea891n@googlegroups.com> <874jwjsj66.fsf@hope.eyrie.org> <b6710de6-919f-4331-a663-b18eaed4346an@googlegroups.com> <87r0znqzj9.fsf@hope.eyrie.org> <f129b02c-cd9c-409d-b88f-8053d62f14e2n@googlegroups.com> <87edvnqqvz.fsf@hope.eyrie.org> <aecf2f19-92ee-4c4f-9334-763ad2375d0bn@googlegroups.com> <87tu4hvd23.fsf@hope.eyrie.org> <82780217-dd2d-4931-9d84-4d0b01cb7090n@googlegroups.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org; logging-data="10280"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:Vjmyhu0W03CsSpKqhygH5U3pjhs=