New to Linux - chown not worked as per expectation
by ckumar from LinuxQuestions.org on (#5BG9F)
below is the snapshot of the code in production , requirement was to change the user and owner for one of the directory "policy"
i added $chown -R ${USER}:${USER} /opt/app/policy just below the existing code in prod which is $chown -R root:${USER} /opt/app.
now it lookis like
chown -R root:${USER} /opt/app
chown -R ${USER}:${USER} /opt/app/policy
but after running script the "policy" directy dont have the user changed it still shows root.


i added $chown -R ${USER}:${USER} /opt/app/policy just below the existing code in prod which is $chown -R root:${USER} /opt/app.
now it lookis like
chown -R root:${USER} /opt/app
chown -R ${USER}:${USER} /opt/app/policy
but after running script the "policy" directy dont have the user changed it still shows root.