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
Post a Comment