I have a daemon running with a user (let's call it) myuser. I wanted him to be able to read and write the files in the /var/www directory. The owner of this directory and all the files inside it is www-data (the user of apache2). So I added myuser to the group www-data with the addgroup command, and did a chmod recursively on all the files in www-data. So now i have something like rwx rw- r-x on every files. The command 'groups myuser' tells me that my user is in the groups www-data and myuser, so everything is ok here.
Now I'd like to refresh the groups permissions, cause my daemon is still running, and he can't write anything in /var/www. I read the manpage for the newgrp command, but I think that this command can refresh the permissions only for my current user, not the user of my daemon (or if i can, I don't know how to use it...).
So my question is: How can I refresh the rights of myuser without reboot? Should I restart the daemon?
Thanks for your attention.
All the best :)