[chef] Re: Permissions are not being set right.


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Permissions are not being set right.
  • Date: Wed, 22 Jan 2014 10:47:13 -0800


On Wednesday, January 22, 2014 at 9:54 AM, Alfredo Palhares wrote:

Hello chefs once more,

I am wrinting a cookbook[1] and i see the permissions are not being properly set for some
weird reaseon (please refer to the #7-client-recipe branch). Here is a kitchen converge.

$ kitchen converge client
snip.. 
* directory[/home/barman/.ssh] action create[2014-01-22T17:38:07+00:00] INFO: Processing directory[/home/barman/.ssh] action create (pgbarman::client line 15)
[2014-01-22T17:38:07+00:00] INFO: directory[/home/barman/.ssh] mode changed to 640

- change mode from '0600' to '0640'

- restore selinux security context
snip... 
Its all seems fine but:

$ kitchen login client
kitchenLast login: Wed Jan 22 17:38:03 2014 from 10.0.2.2
~]$ sudo -s
vagrant]# su - barman
~]$ ls
~]$ ls -als
total 28
4 drwx------. 3 barman barman 4096 Jan 22 17:37 .
4 drwxr-xr-x. 4 root root 4096 Jan 22 17:36 ..
4 -rw-------. 1 barman barman 97 Jan 22 17:37 .bash_history
4 -rw-r--r--. 1 barman barman 18 Feb 21 2013 .bash_logout
4 -rw-r--r--. 1 barman barman 176 Feb 21 2013 .bash_profile
4 -rw-r--r--. 1 barman barman 124 Feb 21 2013 .bashrc
4 drw-r-----. 2 barman barman 4096 Jan 22 17:36 .ssh
~]$ cd .ssh/
-bash: cd: .ssh/: Permission denied

What gives to this ? If I had a bash block with chown -R barman:barman .ssh i can access the directory.

Is it the directory block ? Am I doing something wrong ?



--
Regards,
Alfredo Palhares
Don’t you want mode 7XX for a directory? If it’s not that, then it could be selinux configuration, you could see if disabling selinux changes anything.

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§