I have a script which is called with sudo ./script.sh. script.sh creates files and sets permissions. When I try to get the user name it returns root.
How can I get the username of the person who called the sudo command so that the user read and write to the files without having to chmod it?
Bookmarks