Changing Permission For all Files within Directories

QUESTIONS CENTRECategory: apacheChanging Permission For all Files within Directories
ZENHOST Support Staff asked 3 years ago

You are getting argument list error as there are large number of files.

Or you are getting an 500 error. If you are getting a 500 error then your files need to change to 644.

With this solution you will be up and running in just a few minutes.

You can use the following command to change only the file permission to 666 inside a directory or to 644.

This command will not change permission of the folders present inside this directory

cd /path/to/directory
find . -type f | xargs chmod 666

You can modify back to 644 or from 666 as below.

cd /path/to/directory
find . -type f | xargs chmod 644