I have a daemon that needs access to (read/write) some files that a gui app also has access to (read/write). The daemon runs as root but the gui does not. Each time the daemon accesses the files, the owner becomes root:root. What is the preferred way to handle this?
This is in Ubuntu 16.04, doesn't need to be compatible with anything else.
is there also a best/preferred location to put these files?