[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ubiquiti Unifi virtual controller available from RPMFusion soon



On Tue, Dec 19, 2017 at 07:25:14PM -0600, dsavage@peaknet.net wrote:
> Well, there's apparently an ongoing problem with CentOS 7 ... :-( I
> wish I could learn how to make it work...
> 
> When I run "chown root:root /var/lib/unifi /var/log/unify /var/run/unifi"
> and append your UNIFI_USER bit to the main command line, it becomes:
> 
> # docker run -p 8080:8080 -p 8443:8443 -p 192.168.1.75:8880:8880 -p
> 192.168.1.75:8843:8843 -p 192.168.1.75:3478:3478/udp --name=unifi --rm -v
> /srv/docker/unifi-store/run:/var/run/unifi -v
> /srv/docker/unifi-store/log:/var/log/unifi -v
> /srv/docker/unifi-store/lib:/var/lib/unifi silug/unifi -e UNIFI_USER=root
> 
> Unfortunately, when I run this as root CentOS 7 barfs with this:
> 
> chown: changing ownership of '/var/lib/unifi': Permission denied
> chown: changing ownership of '/var/log/unifi': Permission denied
> chown: changing ownership of '/var/run/unifi': Permission denied
> logger: invalid option -- 'R'
> 
> Usage:
>  logger [options] [<message>]
> ...
> For more details see logger(1).
> unifi cannot start. Please create unifi user, and chown -R unifi
> /var/lib/unifi /var/log/unifi /var/run/unifi
> 
> Is this the "*major*" permissions change you referred to?

No, I'm pretty sure this is a SELinux problem.  Try this command line:

    docker run \
        -p 8080:8080 \
        -p 8443:8443 \
        -p 8880:8880 \
        -p 8843:8843 \
        -p 3478:3478/udp \
        --name=unifi \
        --rm \
        -v /srv/docker/unifi-store/run:/var/run/unifi:Z \
        -v /srv/docker/unifi-store/log:/var/log/unifi:Z \
        -v /srv/docker/unifi-store/lib:/var/lib/unifi:Z \
        silug/unifi

Note the ":Z" on the end of the volume maps...  That sets a private
label on each directory so that only this container can access the
directory.

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.