I have a script that is run sometimes via the web, sometimes via the command line. When the script is run via web, it's run via user
www-data. When it's run via command line, it's run via user
This script writes to a directory called
- If I
chown -R jason cache, I can run the script as
www-data. This makes sense.
- If I
chown -R www-data cache, I can run the script as
jason. This also makes sense.
I tried creating a group called
scripts, adding my two users, then
scripts. I'm not really sure how to do the last part, the
chowning part. The Linux command docs I've found online for this are astoundingly bad.
I don't know if I explained this all that well but hopefully it's clear what I'm trying to do. Any advice would be appreciated.