Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

nfs4acl (4) Versions 1.0.1

Provides nfs4_setfacl resource

Policyfile
Berkshelf
Knife
cookbook 'nfs4acl', '~> 1.0.1', :supermarket
cookbook 'nfs4acl', '~> 1.0.1'
knife supermarket install nfs4acl
knife supermarket download nfs4acl
README
Dependencies
Changelog
Quality 17%

nfs4acl Chef cookbook

The nfs4acl cookbook provides the nfs4_setfacl custom resource.

Requirements

  • Chef 12.5 or higher
  • Ruby 2.0 or higher (preferably from the Chef full-stack installer)
  • Network accessible package repositories

Packages

  • nfs4-acl-tools - nfs4acl needs nfs4_getfacl and nfs4_setfacl commands.

Platform Support

The following platforms have been tested with Test Kitchen:
- CentOS
- Red Hat

Usage

metadata.rb

Include nfs4acl as a dependency in your cookbook's metadata.rb.

depends 'nfs4acl', '= 1.0.1'

nfs4acl::default

The default recipe is blank because this is a resource cookbook.

Resources

Define a nfs4_setfacl resource in your recipe to set a NFS4 ACL on a mounted file/directory.
Specify the file/directory path as the resource name and the ACL as an array of strings.
Details on the ACL format can be found in the nfs4_acl man page (http://linux.die.net/man/5/nfs4_acl).
NFS4 ACLs are different from standard POSIX permissions.

The default action :set uses nfs_setfacl -s ... to set the specified NFS4 ACL.

nfs4_setfacl '/tmp/test_file_or_dir' do
  acl [
    'A::OWNER@:rwaDxtTnNcCy',
    'D::OWNER@:o',
    'A:g:GROUP@:rxtncy',
    'D:g:GROUP@:waDTNCo',
    'A::EVERYONE@:rxtncy',
    'D::EVERYONE@:waDTNCo'
  ]
end

The action :add uses nfs_setfacl -a ... to add the specified NFS4 ACL.

nfs4_setfacl '/tmp/test_file_or_dir' do
  acl [
    'A:fdi:OWNER@:rwaDxtTnNcCy',
    'A:fdig:GROUP@:rwaDxtTnNcy',
    'A:fdi:EVERYONE@:rxtncy'
  ]
  action :add
end

Contributing

  1. Fork the repository on Github.
  2. Create a named feature branch (like add_component_x).
  3. Write your change.
  4. Write tests for your change (this cookbook currently uses InSpec with Test Kitchen).
  5. Run the tests, ensuring they all pass.
  6. Submit a Pull Request using Github.

License and Authors

Author: Richard Lock

Copyright 2016 University of Derby

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

nfs4acl Cookbook CHANGELOG

1.0.1 (2016-02-03)

  • Richard Lock
  • Fixed issue #2: ensures current_acl is array

1.0.0 (2016-02-03)

  • Richard Lock
  • Changed default resource action to :set
  • Added resource action :add

0.1.1 (2015-12-16)

  • Richard Lock
  • Updated README

0.1.0 (2015-12-15)

  • Richard Lock
  • Initial release of nfs4acl

Collaborator Number Metric
            

1.0.1 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.0.1 failed this metric

FC115: Custom resource contains a name_property that is required: nfs4acl/resources/nfs4_setfacl.rb:23
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.0.1 passed this metric

Testing File Metric
            

1.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.0.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number