How to change the permissions of files in a directory recursively

Chris Green cl at isbd.net
Mon Apr 24 18:27:44 UTC 2017


On Mon, Apr 24, 2017 at 01:16:13PM -0500, Jim wrote:
> How can I leave the permission of a directory at 755 and change the
> permissions of all of it's files to 766? Everything I have tried and what I
> have found googling ends up setting the dir and file permissions the same.
> 
> So if I have /var/www/html/foo/  I want foo to remain at 755 and files in
> foo to change to 766.
> 
I'm not sure if it's *exactly* what you're after but take a look at
the difference between 'x' and 'X' in the man page for the chmod
command.

-- 
Chris Green




More information about the ubuntu-users mailing list