I got a script rquiringrequiring sudo, but the script must set parameters according to the original user, such as:
chown "${USER}:${USER}" dir
chown "${USER}:${USER}" dir
If I set it under sudo, I just end up with "chmod root:root"chmod root:root, which doesn't help.
HowSo how can I do that get the user name before sudo?