Reputation: 707
Question:
What kind of permissions should I give to Composer on Windows?
Server information:
Windows 2012 R2
IIS 8.5
Error message:
[RuntimeException]
C:\inetpub\wwwroot/vendor does not exist and could not be created.
Steps that I've tried and thoughts:
I've installed Composer through the .exe file.
I have a composer.json file in C:\inetpub\wwwroot and when I try running composer install
or composer update
, I get the error message.
I've tried manually creating the vendor folder in the directory, but then it cannot download the package that I have in my composer.json file, giving roughly the same error message, that the package doesn't exist and could not be created.
I've googled the error, and I'm led to believe it's a permissions issue, however, I have installed Composer on another server and installed packages in the C:\inetpub\wwwroot directory without a problem. I've tried comparing security group permissions between the two servers for wwwroot and inetpub, and the permissions were the same. I had someone suggest trying to copy the .json file to My Documents on the server and try running composer install from there, and that worked. Which further indicates it's a permissions issue, but I can't figure out what.
Upvotes: 6
Views: 16074
Reputation: 648
Please ensure that whether your deployment folder is having composer.lock file or not.' If not please deploy the file there.
Upvotes: 1
Reputation: 707
After re-reading another Linux question, I figured out what the problem was. I need to be running Command Prompt as administrator. Now it works.
Upvotes: 8