Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad owner for vhost log directory #28

Open
randomstuff opened this issue Sep 6, 2017 · 0 comments
Open

Bad owner for vhost log directory #28

randomstuff opened this issue Sep 6, 2017 · 0 comments

Comments

@randomstuff
Copy link

randomstuff commented Sep 6, 2017

The vhost log directory is owned by root (and only root can write there):

# From Nginxpack::Vhost::Basic
file { "/var/log/nginx/${name}/":
    ensure => directory,
    mode   => '0770',
    owner  => 'root',
    group  => 'root',
}

However the log file should be writeable by www-data:

the user whose credentials are used by worker processes should have permissions to create files in a directory with such logs;

The result is a bunch of errors such as:

2017/09/06 06:32:23 [emerg] 6964#0: open() "/var/log/nginx/example/access.log" failed (13: Permission denied)

See issue #7 however.

Maybe we need in the logrotate snippet:

su www-data adm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant