I'm trying to run the following:
if [! -f .owner ]; then creator=$(whoami) sudo -u appuser ksh echo "$creator" >> .owner mkdir test1 test2 test3 exit fi
However, the file/folders get made by the person that runs the script. Any way to make these get created by appuser?
sudo -l returns
(appuser) NOPASSWD: ALL