Article View: news.software.nntp
Article #89696Re: innd: SERVER cant open /var/www/inn/inn_status.html: Permission denied
From: Russ Allbery
Date: Fri, 07 Oct 2022 00:34
Date: Fri, 07 Oct 2022 00:34
76 lines
4849 bytes
4849 bytes
Jeffery Small <jefferysmall@gmail.com> writes:
> On Wednesday, October 5, 2022 at 9:14:57 PM UTC-7, Russ Allbery wrote:
>> 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 see that apache2 doesn't have any access problems.
There's definitely some sort of security configuration at play that's
specific to innd. (Either that or innd isn't actually running as the user
news, but presumably you've checked that with ps already.)
I am suspicious that it's something that mounts /x read-only for innd,
which is definitely a thing that one can do with systemd security
configuration, but I don't know why it's happening here because your
systemd configuration does not seem to be doing that.
> In /etc/news/inn.conf file there is only one entry that points to a symlink
> path:
> pathhttp: /var/www/inn
> I guess there are two things I could do. 1) change the path to eliminate
> symlinks:
> pathhttp: /x/u/www/inn
> or 2) completely change the location of the directory to somewhere on the
> root drive. For example:
> pathhttp: /var/inn2
> The only thing under the current /var/www/inn directory is the sole
> inn_status.html file. However, I'm not sure what making a change line
> this would do to the overall inn2 operations.
This is the only thing about innd behavior that setting controls. But I
didn't mean that the fact that path points to a symlink is inherently a
problem.
I'm trying to figure out what's different on your system than on other
Ubuntu systems where the inn2 package presumably works (or there would be
a lot of other bug reports). The one thing that we've found so far that
seems to be different on your system is that your /var/www is a symlink to
a different file system, and I know that some systemd security
configuration for daemons mounts different file systems read-only for
security protection. That's consistent with the symptoms that you're
seeing where innd cannot write to that file with a permission denied
error, but when you su to the news user (which doesn't involve any of the
systemd configuration) you can write to the file just fine.
> You are correct. Unsetting the DISPLAY variable allowed the news user
> to edit the file. I am going to have to look into what new things auth
> is doing under the hood. One thought I had was that user news had a
> home directory of /var/spool/news, but cannot login since the shell is
> set to "nologin". Other users get a ~/.Xauthority file created when
> they first login. (Copying my file to that location doesn't work.) Is
> there a way to force non-login users to get an .Xauthority file? If
> not, maybe I need to add a shell, login to create the auth file and then
> reset it to nologin.
In general, you no longer have X access to spawn new X clients after
running su or sudo or the like. I know there's something you can do to
restore access, but I never do this and therefore don't remember what it
is. (Also, I'm not sure if you're running Wayland rather than X; if
that's the case, it has a whole different permissions model and I have not
yet learned how it works.)
I don't think logging on as the user will do it since the web session is
still under your normal user, not under that different user.
--
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:
<87v8ow1ng1.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-mailReferences:
<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> <87o7upvb9c.fsf@hope.eyrie.org> <ce163f8a-c1ed-42b1-b096-82c4a761d615n@googlegroups.com>Show Full Headers
Complete Article Headers
Message-ID: <87v8ow1ng1.fsf@hope.eyrie.org> Subject: Re: innd: SERVER cant open /var/www/inn/inn_status.html: Permission denied Date: Thu, 06 Oct 2022 17:34:22 -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> <87o7upvb9c.fsf@hope.eyrie.org> <ce163f8a-c1ed-42b1-b096-82c4a761d615n@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="25909"; mail-complaints-to="news@eyrie.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:YP83+XKxpvDxmx/N1YEtZrsHo30= Lines: 75