Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Dec 2014 21:32:47 +0100
From:      olli hauer <ohauer@gmx.de>
To:        ports@freebsd.org
Cc:        Andrea Venturoli <ml@netfence.it>, garga@FreeBSD.org
Subject:   Re: Ports changing permissions on directories
Message-ID:  <54860AEF.6020808@gmx.de>
In-Reply-To: <5485FE17.9050909@netfence.it>
References:  <5485FE17.9050909@netfence.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2014-12-08 20:37, Andrea Venturoli wrote:
> Hello.
> 
> There are some ports that insist on changing permissions on some directories.
> An example is clamav, which will always change /var/db/clamav mask to 755.
> 
> Since I always need to "chmod 775 /var/db/clamav" after an upgrade, I'm asking:
> _ where does this come from? I tried to look into Makefile, but didn't get to it;
> _ is this something FreeBSD specific or coming from upstream?
> _ what's the rationale behind this?
> _ can this be avoided or tweaked?
> 
> 
>  bye & Thanks
>     av.
> 
> P.S. Another example would be squid.

Hi Andrea,

the mode is defined in pk-plist.

$ grep @dir /usr/ports/security/clamav/pkg-plist
@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%DBDIR%%
@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%LOGDIR%%
@dir(%%CLAMAVUSER%%,%%CLAMAVGROUP%%,0755) %%RUNDIR%%


In squid there is no hint for pkg about owner, group and mode
therefor the directories are always set to root:wheel 0755

$ grep @dir /usr/ports/www/squid/pkg-plist
@dir /var/log/squid
@dir /var/run/squid
@dir /var/squid/cache
@dir /var/squid/logs
@dir /var/squid


I think this should be changed to something like this
@dir(squid,wheel,0750) /var/log/squid
@dir(squid,wheel,0755) /var/run/squid
@dir(squid,squid,0750) /var/squid/cache
@dir(squid,wheel,0750) /var/squid/logs
@dir(squid,wheel,0750) /var/squid  <== not sure, no squid system to compare at the moment



-- 
olli



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54860AEF.6020808>