Quantcast
Channel: Using chown $USER:$USER inside bash script - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 6

Answer by Andreas Bartels for Using chown $USER:$USER inside bash script

$
0
0

There is only a tiny fault I think. sudo opens a new shell for executing the command and after sudo the user is root. So maybe you should use something like this:

MYUSER=$USER

sudo chown $MYUSER:$MYUSER

as i think MYUSER is not systemspezific overwritten and shall work.


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>