Git Product home page Git Product logo

puppetlabs-nginxpack's People

Contributors

jvaubourg avatar randomstuff avatar sbadia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

puppetlabs-nginxpack's Issues

logrotate problem (insecure permissions on vhost directory)

Hi,

With logrotate enabled, I've this error messages /var/log/nginx/<vhost>/access.log is owned by www-data. any reasons for that?

/etc/cron.daily/logrotate:
error: skipping "/var/log/nginx/monitoring/access.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/nginx/monitoring/error.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

Bad owner for vhost log directory

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.