How to make right permissions on web server

June 9, 2013 | No Comments | Programming | chmod linux permissions web-server

One of the most frequent problem is permissions.This is a headache for web developer.I have light  and easy solution.I had tested it on my Debian GNU/Linux server.

cd /webfolder/
chown -R www-data:www-data .
find . -type d -print0 | xargs -0 chmod 775
find . -type f -print0 | xargs -0 chmod 644

In this script we setting up permissions to folders and directories.Also we changing owner to web-server user.

I think that the simplest way.If you have more easier method you can describe it in comments.


About the Author / Artem Zhuravlev

Artem Zhuravlev. Web developer. Blog writer.

Need help with your website ? Contact with me by email infzanoza@gmail.com for services of experienced web developer.

Follow @infernosquad

LEAVE A COMMENT