Debug School

Adity Pratap Singh
Adity Pratap Singh

Posted on

Aditya's Assignment for Day-2

1- Write a recipe to create a file which should be owned by group called “root”, user “ec2-user” and permission executable.

Solution :
file "created-file.txt" do
owner 'ec2-user'
group 'root'
mode '754'
action :create
2- Write a recipe to updates the access (atime) and file modification (mtime) times for a file.

file '/home/centos/chef-repo/cookbooks/example/recipes/atime.txt' do
content 'This is my first file'
action :touch
action :create

Top comments (0)