Change permission for ALL folders and files

Posted by Xweque on Ask Ubuntu See other posts from Ask Ubuntu or by Xweque
Published on 2012-10-29T14:48:53Z Indexed on 2012/10/29 17:23 UTC
Read the original article Hit count: 378

Filed under:
|
|

I've been around Ubuntu for not too long now and I'm getting tired of a thing I used to accept. When I installed Apache and PHP on Ubuntu it was done with root meaning it got permission. So I changed that to me. Now I've just copied a big number of files, (PHP), to be viewed and edited in these directories. Now my problem: I can not view the files from var/www/ because it requires, for some reason, everyone to have access to the files. Not only me, or my group but everyone. No one else is using the computer but me, so I'm cool with it. Though I need a command to change ALL files permission recursively. When I've browsed the questions already been answered I find for example chown -R viktor:viktor /var/www/, or using sudo as well.

This worked on the single var/www and the folders inside but not the files inside the folders and very odd I notice I can't do the same thing on example /var/www/dev/.

© Ask Ubuntu or respective owner

Related posts about permissions

Related posts about apache