Ports changing permissions on directories

olli hauer ohauer at gmx.de
Mon Dec 8 20:32:59 UTC 2014


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


More information about the freebsd-ports mailing list