This is probably crazy easy and I'm likely missing it just because I'm running on 4 hours sleep for the past 3 days so please forgive me for being dense.
I'm trying to execute cp as another user using sudo -u and receiving error when using a * wildcard.
When executing:
sudo -u client3 cp ./client3/processed/*Referrals*.xml ./client3/incoming
I receive the following error:
sudo: unable to execute /bin/cp: Success
However if I change the command to contain a character prior to the first asterisk then it works without error, e.g.:
sudo -u client3 cp ./client3/processed/9*Referrals*.xml ./client3/incoming
The incoming and processed directories and their files are all owned by client3 as well. Some of the file names do contain spaces as well.
Any pointers on what I'm doing wrong / missing?
[link][1 comment]