Scanning as a directory owner
You can scan directories as the owner of the directory:
root:for VOLUME in /Volumes/*; do sudo -u \#`stat -f %u "$VOLUME"` '/Applications/ESET Cyber Security.app/Contents/MacOS/esets_scan' -f /tmp/scan_log "$VOLUME"; done |
You can also scan the /tmp folder as a currently logged-in user:
root:sudo -u \#`stat -f %u /dev/console` '/Applications/ESET Cyber Security.app/Contents/MacOS/esets_scan' /tmp |