CLI

Linux Permissions Command Line

roland's picture

To allow the web server process to write to a file, I find myself doing this a lot:

find . -type f | xargs chmod 606

The problem is that some files have spaces in them and it screws up the command. You can force the delimiter to be the NULL pointer instead of space using the following command:

find . -type f -print0 | xargs -0 chmod 606

and for directories

find . -type d -print0 | xargs -0 chmod 707
Syndicate content