Linux Set User and Group Ownership for Future Files and Folders -


i changing user , group ownership using following command:

sudo chown -r apache:www /var/www 

however, noticed whenever added new file or folder directory, owner current username instead of intended user, apache. how can modify above command future folders , files owned apache:www? or need use command?

my guess need change user before executing command - script this:

$whoami user1 $ su - apache password: $ whoami apache [add file] $ exit 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

wso2esb - How to concatenate JSON array values in WSO2 ESB? -