[Buildroot] [PATCH V3 2/5] package/squid: add init script
thomas.petazzoni at free-electrons.com
Sun Nov 30 08:33:14 UTC 2014
On Sat, 29 Nov 2014 20:41:52 +0100, Guillaume GARDET - Oliséo wrote:
> >> +# (Re)create log directory and give access to squid user (nobody)
> >> +if [ ! -d $SQUID_LOG_DIR ]; then
> >> + mkdir -p $SQUID_LOG_DIR
> >> + chmod 777 $SQUID_LOG_DIR
> > Clearly, this doesn't look good. Don't we have a better option than 777
> > the log directory?
> Maybe create a squid user? Not sure how to handle this in buildroot. What do you think?
Well, if squid currently runs as root, why do you need to "chmod 777"
the log directory?
But indeed, it would be nicer to run squid as a user. Look at
<pkg>_USERS and <pkg>_PERMISSIONS in the Buildroot manual, or grep
through the packages for such definitions, you'll see some examples on
how to achieve that.
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
More information about the buildroot