Code Monkey home page Code Monkey logo

posix_acl's Introduction

posix-acl cookbook

Requirements

This cookbook is only being tested against Chef 11.4.4 at this time.

Usage

In order to use this cookbook, you'll need to "wrap" it in an implementing cookbook with all of the ACL templates, or specific ACL patterns you wish to apply.

To begin, simply add include_recipe "posix-acl::default" to your implementing cookbook. This will ensure that acl support is enabled and that the requisite OS package is installed.

After adding the default recipe, you will need to override the default attributes so that they match your environment.

This is an example of how to create a template from within your wrapper cookbook:

posix_acl_manage_template 'vagrant_template' do
  action :create # This can also be :delete
  template_name 'vagrant_template'
  template_content %w{
    user::rwx
    user:vagrant:rwx
    group::rwx
    group:vagrant:rwx
    mask::rwx
    other::r-X
    default:user::rwx
    default:user:vagrant:rwx
    default:group::rwx
    default:group:vagrant:rwx
    default:mask::rwx
    default:other::r-X
  }
end

This is an example of applying ACLs from a template that has been created:

posix_acl_manage_acl 'apply_vagrant' do action :apply # This can also be :remove apply_to '/opt' # The path to apply ACLs to. template_name 'vagrant_template' # If you are removing ACLs, you don't need this. recursive true # If your 'apply_to' value is a file, this must be false. end

Attributes

This is the full path to the fstab file you are using.

default['posix_acl']['fstab_path'] = '/etc/fstab'

This is the full path to the backup file you wish to create.

default['posix_acl']['fstab_backup'] = '/etc/fstab.bak'

This is the physical device (or partition label) you wish for the cookbook to enable ACLs on. e.g. - "/dev/sda1" (or just "sda1" is ok) or "LABEL=server-store

default['posix_acl']['mount_point_device'] = 'LABEL=cloudimg-rootfs'

This is the actual mount point you are enabling ACLs on.

default['posix_acl']['mount_point'] = '/'

This is where the cookbook will be storing ACL templates when they are applied.

default['posix_acl']['template_store'] = '/usr/local/lib'

Author

Author:: Jon Chappell ([email protected])

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.