Allow all users to trigger a data sync to shared directory (groups vs dummy user?)
1
vote
1
answer
26
views
I have an Ubuntu server with ~6-7 users. We all use some software that requires some shared files and folders to be regularly updated. Let's call that shared directory
/opt/science/online-data
Within this are some calibration and data files that are updated on an irregular basis on an external public server not owned by me. I have a cron job that runs an rsync command every day at 5 AM to keep it up-to-date. In everday usage, this folder just needs to be readable by all users (not written to).
However, there are times where the software throws an error indicating that the online-data folder needs to be immediately updated before the software can be used. I'm not always around as admin to run that command. I'd like to set things up so that any of my users can run a script "update_online_data.py" or whatever, and it will trigger the rsync.
I tried doing this by having the online-data folder group set to a specific group "softwaregroup" and giving all users membership, but the users are reporting permission errors. That's probably an error I can figure out (I'm pretty sure this should work.), but I wonder if there is a more secure way to do this anyway? Right now the group membership could in theory allow them to mess up those files when I really do not want them to do anything other than the rsync. Is there a way to create a command that triggers a non-login user specific to this task to do this and only this? (I have a vague idea that daemons or services might be a possibility, but I don't have a lot of experience using them in a custom way.)
Asked by ETM
(31 rep)
Dec 31, 2024, 04:55 PM
Last activity: Jan 6, 2025, 01:36 PM
Last activity: Jan 6, 2025, 01:36 PM