You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Tomasz Kuzemko <to...@ovh.net> on 2013/08/13 16:58:47 UTC
make install sets localstatedir owner to ats user - bug?
Hello,
When building traffic server I call configure with --localstatedir=/var
and --with-user=trafficserver. I noticed that make install sets /var
owner and group to trafficserver. After doing some research I found
that the problematic code is in proxy/Makefile.am:
293 install-data-local:
294 if [ `id -un` != "root" ]; then \
295 $(INSTALL) -d $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) $(DESTDIR)$(pkgruntimedir) \
296 $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) \
297 $(DESTDIR)$(pkgcachedir); \
298 else \
299 $(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) \
300 $(DESTDIR)$(pkgruntimedir) $(DESTDIR)$(pkgsysconfdir) \
301 $(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(pkgcachedir); \
302 fi
After this modification the problem goes away:
293 install-data-local:
294 if [ `id -un` != "root" ]; then \
295 $(INSTALL) -d $(DESTDIR)$(pkglocalstatedir) $(DESTDIR)$(pkglogdir) $(DESTDIR)$(pkgruntimedir) \
296 $(DESTDIR)$(pkgsysconfdir) $(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) \
297 $(DESTDIR)$(pkgcachedir); \
298 else \
299 $(INSTALL) -d $(DESTDIR)$(pkglocalstatedir); \
300 $(INSTALL) -d -o $(pkgsysuser) -g $(pkgsysgroup) $(DESTDIR)$(pkglogdir) \
301 $(DESTDIR)$(pkgruntimedir) $(DESTDIR)$(pkgsysconfdir) \
302 $(DESTDIR)$(pkgsysconfdir)/internal $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(pkgcachedir); \
303 fi
I also considered setting --localstatedir=/var/trafficserver but then
log dir is set to /var/trafficserver/log/trafficserver which seems just
wrong.
So is this by design or should I fill a bug report?
--
Tomasz Kuzemko
tomasz.kuzemko@ovh.net
Re: make install sets localstatedir owner to ats user - bug?
Posted by Tomasz Kuzemko <to...@kuzemko.net>.
Reported as TS-2131, patch included:
https://issues.apache.org/jira/browse/TS-2131
--
Tomasz Kuzemko
tomasz@kuzemko.net
W dniu 13.08.2013 17:11, Leif Hedstrom pisze:
> On Aug 13, 2013, at 8:58 AM, Tomasz Kuzemko <to...@ovh.net> wrote:
>
>> Hello,
>>
>> When building traffic server I call configure with --localstatedir=/var
>> and --with-user=trafficserver. I noticed that make install sets /var
>> owner and group to trafficserver. After doing some research I found
>> that the problematic code is in proxy/Makefile.am:
>
> Hmmm, yeah, that does seem broken, doesn't it ? I don't think we write into localstatedir directly, but into subdirectories of that? Can you file a bug, and perhaps go through the layout.config as well, to make sure we never need write perms / ownership of this dir?
>
>
>>
>> I also considered setting --localstatedir=/var/trafficserver but then
>> log dir is set to /var/trafficserver/log/trafficserver which seems just
>> wrong.
>
>
> Well, you could override that too in this case. Looking at the layout.config, it seems in many cases it'll do e.g.
>
> localstatedir: /var+
> runtimedir: ${localstatedir}/run
> logdir: ${localstatedir}/log
> cachedir: ${localstatedir}/cache
>
>
> (which makes it e.g. /var/ltrafficserver/log/).
>
> Thanks!
>
> -- leif
>
Re: make install sets localstatedir owner to ats user - bug?
Posted by Leif Hedstrom <zw...@apache.org>.
On Aug 13, 2013, at 8:58 AM, Tomasz Kuzemko <to...@ovh.net> wrote:
> Hello,
>
> When building traffic server I call configure with --localstatedir=/var
> and --with-user=trafficserver. I noticed that make install sets /var
> owner and group to trafficserver. After doing some research I found
> that the problematic code is in proxy/Makefile.am:
Hmmm, yeah, that does seem broken, doesn't it ? I don't think we write into localstatedir directly, but into subdirectories of that? Can you file a bug, and perhaps go through the layout.config as well, to make sure we never need write perms / ownership of this dir?
>
> I also considered setting --localstatedir=/var/trafficserver but then
> log dir is set to /var/trafficserver/log/trafficserver which seems just
> wrong.
Well, you could override that too in this case. Looking at the layout.config, it seems in many cases it'll do e.g.
localstatedir: /var+
runtimedir: ${localstatedir}/run
logdir: ${localstatedir}/log
cachedir: ${localstatedir}/cache
(which makes it e.g. /var/ltrafficserver/log/).
Thanks!
-- leif