NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

davidr1's avatar
davidr1
Luminary
Mar 17, 2017

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.

NETGEAR Academy

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

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More