-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Install-Module requires PowerShell to be run as root under Mac OS X #2286
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
Comments
On Windows / PowerShell Desktop it looks like there is a proper permissions warning:
Out of curiosity, does |
Yes, WARNING: The version '1.7.6' of module 'Posh-SSH' is currently in use. Retry the operation after closing the
applications.
PackageManagement\Uninstall-Package : Module 'Posh-SSH' is in currently in use or you don't have the required
permissions. I would suggest to implement a similar warning for |
@ffeldhaus Is it possible to provide more details on how to determine a user who is not root nor member of the wheel group? |
In this case, it should only be restricted to those with write access to the modules directory. Any user/group membership check would fail to paint the full picture. A system administrator could set the module directory to be owned by The if (0 == access(MODULE_DIRECTORY, W_OK)) {
// module installation is allowed
} |
This issue was moved to PowerShell/PowerShellGet#21 |
Steps to reproduce
Install PowerShell 6 Alpha 10 and run powershell as a user who is not root nor member of the wheel group. Then run
Install-Module -Name Posh-SSH
which will fail with exceptionCould not find a part of the path
.Expected behavior
Either users who are not root nor member of the wheel group should be able to install Modules via
Install-Module
or if, for security reasons, installing modules should only be allowed to the root user or members of the wheel group, thenInstall-Module
should fail with a hint that root privileges are required.Actual behavior
Environment data
The text was updated successfully, but these errors were encountered: