Where can I change the default file permissions that apache2 set for a file when its created or edited ?
I currently have to run
#!/bin/sh chown -R username:www-data . find . -type f | xargs chmod 664 find ./bin -type f | xargs chmod 775 find . -type d | xargs chmod 775 find . -type d | xargs chmod +s umask 0002
to fix my file permissions, after Apache2 have created a file.
all my files in /var/www/html need to have this permissions set up:
drwsrwsr-x 2 username www-data
for everything to work smothly
But all files created by apache have this permission set up:
drwxr-sr-x 2 www-data www-data
- Note: This is a dev server, so security at this point is not the highest priority. I use the box for learning, and its accessible only locally. But if I do something wrong in my approach, then a heads up is appreciated