Apache Server files in /var/www/

westexasman asked:

All right… I have my server set up and I have 4 sites residing in /var/www/. Each site directory and the files underneath it are all root:www-pub according to this post:

What's the best way of handling permissions for apache2's user www-data in /var/www?

My user, cdog, is part of the www-pub, as directed by the above post and, after more research, I believe umask is set up properly.

Issues 1: Creating new files inside any of the /var/www/ directories gives me permissions

cdog:www-pub -rw-r--r--

all other files are

root:www-pub -rw-rw-r--

I was led to believe (according to above post) that any new files created would be the later.

Issue 2 Most of these directories, with permissions of

drwxrwsr-x

are Joomla directories. Logging into the Joomla back end gives me a whole bunch of unwritable directories, which isn’t good for updating/installing extensions/plugins, etc.

First, why aren’t my files being created with the correct permissions?
Second, why are the Joomla directories not writable?

My answer:


Before working with the files, you need to set your umask.

umask 002

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.