Small improvement to install script

AgentB boinc at u4ear.com
Sat Aug 19 14:22:46 UTC 2017


Hi maintainers

This relates to https://boinc.berkeley.edu/dev/forum_thread.php?id=11773

It is not uncommon for users to want to move the boinc directory or
creat config files in /var/lib/boinc-client and this can creat files
with the wrong ownership.

Looking at the dpkg files

boinc-client.postinst

includes

---------------

# Make sure the /var/lib/boinc-client directory exists and
    # is owned by the boinc user.
    mkdir -p $BOINC_DIR
    [ -x /sbin/restorecon ] && /sbin/restorecon $BOINC_DIR

    chown -h boinc:boinc $BOINC_DIR 2>/dev/null || true

---------------

if we could (should?) change the chown to recursively set ownership.

    chown -hR boinc:boinc $BOINC_DIR

This will refresh the ownership on an existing data directory.

I was also thinking about adding a

   chmod -R u+rw,go+r $BOINC_DIR

but that's not right for gui_rpc_auth.cfg and remote_hosts.cfg but is
correct for most things.

---------------

One negative to this is if the $BOINC_DIR is mapped very badly, or root
users use the directory for other things (they probably shouldn't) - the
system may change files not belonging to boinc.

Cheers

Mike





More information about the pkg-boinc-devel mailing list