Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Fix for file ownership issues #67

Merged

Conversation

hugobast
Copy link
Contributor

user is an option that gets ignored by puppet. uid is meant to be
used in order to set a user to execute the command. I cannot find a
point at which it ever was user in recent, not so recent and far distant
versions of puppet which leads me to believe this change was
introduced by accident.

The effect of using user vs uid are shown below:

▶ ls -l `npm config get prefix`/lib/node_modules
total 0
drwxr-xr-x  12 hugobastien  staff  408 14 Nov 22:37 gulp-cli
drwxr-xr-x  25 hugobastien  staff  850 11 Nov 13:18 npm
drwxr-xr-x   6 nobody       staff  204 14 Nov 22:09 react-native-cli

gulp-cli was installed with the fix that I'm submitting here while
react-native-cli was installed current version of puppet-nodejs

`user` is an option that gets ignored by puppet. `uid` is meant to be
used in order to set a user to execute the command.

The effect of using `user` vs `uid` are shown below:

```
▶ ls -l `npm config get prefix`/lib/node_modules
total 0
drwxr-xr-x  12 hugobastien  staff  408 14 Nov 22:37 gulp-cli
drwxr-xr-x  25 hugobastien  staff  850 11 Nov 13:18 npm
drwxr-xr-x   6 nobody       staff  204 14 Nov 22:09 react-native-cli
```

gulp-cli was installed with the fix that I'm submitting here while
react-native-cli was installed current version of puppet-nodejs
@jacobbednarz
Copy link
Member

This looks like it was specifically changed in #52 to address some similar issues to what you are facing.

@hugobast would you mind linking to the docs where you have seen this in puppet-land? I also think this is uid (and guid where needed) however I cannot find the docs on it.

cc @hirocaster and @blackjid

@blackjid
Copy link
Member

Looks like you are right, and it should be uid. I mistakenly merge that PR. The user param is for the exec method, not for the execution library which is being used.

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/execution.rb#L119

Maybe @hirocaster had permission issues with we published the PR.

@hirocaster
Copy link
Member

hirocaster commented Nov 15, 2016

OK, I will retry it. Sorry, this PR #52 .

@jacobbednarz
Copy link
Member

Thanks everyone! I appreciate it.

@jacobbednarz jacobbednarz merged commit e2f029a into boxen:master Nov 15, 2016
@hugobast hugobast deleted the fix/npm-global-module-permissions branch November 16, 2016 05:27
@blackjid
Copy link
Member

@jacobbednarz Do you think this should be released?? thanks

@jacobbednarz
Copy link
Member

great idea! i've cut 5.0.9 to get this fix available.

jacobbednarz added a commit to boxen/our-boxen that referenced this pull request Nov 23, 2016
Updates the nodejs puppet module to 5.0.9 to fix the permission issues
reported in boxen/puppet-nodejs#67
@jacobbednarz
Copy link
Member

got this boxen/our-boxen upstream too via boxen/our-boxen#836

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants