NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
davidr1
Mar 17, 2017Luminary
Cron job running script - ownership problem OS6
I created a directory /scripts for my scripts.
I have a script which detes a /data/<path>/foldername1, copies /data/<path>/foldername2 to /data/<path>/foldername1, e.g.:
rm -r /data/<path>/.thunderbird_copy cp -r /data/<path>/.thunderbird /data/<path>/.thunderbird_copy
It runs OK but it is owned by systemd Network Management
How can I, in the script, change ownership and permissions so that I can access it normally from my pc?
Is there a way to tell it to retain the ownership & permmisions of .thunderbird, the folder it is copying?
I tried
chown -R david /data/<path>/.thunderbird-business_copy
but it doesn't work. The NAS doesn't know my pc admin groups and name.
I can't change ownership from the pc either.
3 Replies
Replies have been turned off for this discussion
- jak0lantashMentorOr if necessary: rsync -a --acls
- jak0lantashMentorcp -a
- davidr1Luminary
cp -a works thanks.
Thank you very much for your help.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!