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

special case permissions when creating /opt #4244

Merged

Conversation

rolandwalker
Copy link
Contributor

or any other toplevel directory. Closes #4187

or any other toplevel directory. Closes Homebrew#4187
@twhittock
Copy link

This fixes the default case, but you should be aware that if the caskroom is anything deeper than /toplevel/caskroom eg /opt/foo/bar/caskroom - then the intermediate directories would also have the root owner and permission bits which would render the caskroom inaccessible.

I'd recommend using mkdir -m 0755 #{caskroom} in the sudo command followed by the appropriate chown and possibly a chmod using the current umask for the parent dir.

@rolandwalker
Copy link
Contributor Author

Thanks for noting these specific points for the future, @twhittock . I am intentionally making the patch absolute minimum impact, per the reasons in #4187. Oh, and thanks again for the original report!

rolandwalker added a commit that referenced this pull request May 8, 2014
special case permissions when creating `/opt`
@rolandwalker rolandwalker merged commit dd5d767 into Homebrew:master May 8, 2014
@rolandwalker rolandwalker deleted the toplevel_dir_permissions branch May 8, 2014 02:36
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

umask 0003 causes creation of badly permissioned /opt directory
2 participants