In this above command what is sudo,chown,-R,www-data? In which place we are using this command,why two times www-data reapeted. Please explain me.
locked by Chris S Oct 29 '12 at 14:11
This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.
Read more about locked posts here.
The first thing I'll try to explain is
sudo stands for superuser do. Using
sudo, the user can act as a 'root' level of system operation. Shortly,
sudo gives user a privilege as a
And then, about
chown is used for setting the ownership of folder or file. The explanation of
-R had been answered (it recursively descends to all sub-folders).
So the last thing is about www-data written repeated.
www-data:www-data the first one is user, the second is group. Your username can be added as a member of
www-data group, by this command
sudo adduser user www-data, user can be replaced with your username. That command will result in
Hope it helps..
The syntax for chown is user:group - so this command changes the ownder of all files to www-data, and the group to www-data.
It's recursively changing both the user and group owners for the file path specified.