Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"directory" resource does not set "owner" that is not in /etc/passwd #3552

Closed
gkugel opened this issue Jun 18, 2015 · 3 comments
Closed

"directory" resource does not set "owner" that is not in /etc/passwd #3552

gkugel opened this issue Jun 18, 2015 · 3 comments

Comments

@gkugel
Copy link

gkugel commented Jun 18, 2015

When attempting to create a directory with an LDAP user as the owner, the ownership stays as "root"
During my tests I could only set ownership if the username is in /etc/passwd file:

directory '/home/user1' do
owner 'user1'
group 'ldap-users'
mode '0755'
action :create
end

If I run "sudo chown user1 /home/user1" after chef-client, the ownership is changed without any issues.

Version: Chef: 11.12.0.rc.1

Environment: Ubuntu 12.04

@stevendanna
Copy link
Contributor

@gkugel Is the chef-client run where this is failing also the first time ldap is being configured? If so, you might be hitting a problem with the fact that deep down in the stack (glibc), there is caching that occurs at the per-process level which means that configuration changes around nss aren't picked up by that process.

@lamont-granquist
Copy link
Contributor

Yeah that most likely will not be solvable short of patching ruby itself and/or running nscd with user and group caching turned on. I doubt there's a fixable chef-client bug here.

@gkugel
Copy link
Author

gkugel commented Jun 19, 2015

Yep, looks like caching issue. Restarting nscd seems to have helped. Thank you!

@gkugel gkugel closed this as completed Jun 19, 2015
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants