Permission errors when working in WSL / Windows 10

I set up the Ubuntu subsystem on Windows 10, and wanted to have a project that I could test out using Phpstorm. Unfortunately, whenever I try to checkout a branch, I get permission denied errors, likely because there is a mismatch in my user (running PHPStorm from the windows side) and the files that are loaded locally (which are actually in Ubuntu under Windows 10).

What can I do to solve permissions issues when running both platforms?

7 comments

Are you getting any errors? Please share any screenshots that would help us

 

0

Hi there, if a file is being created, modified, or deleted via git, it will put the file name, and then next to it: "permission denied",

 

full error:

Couldn't checkout origin/refactor

C:\Users\Alex\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\www\sites\application:

unable to create file .gitignore: Permission denied
unable to create file .htaccess: Permission denied
unable to create file .overcommit.yml: Permission denied
unable to create file README: Permission denied
unable to create file README.md: Permission denied
unable to create file composer.json: Permission denied
unable to create file composer.lock: Permission denied

0

Do you also run git as native from Windows? Or do you use it under WSL?

Are you able to do the same via command line?

0

I'm using it under WSL. And yes, checking it out under command line in WSL works just fine.

0

Not possible currently. There are workarounds, but from what I can see there are still issues with push/pull.
https://youtrack.jetbrains.com/issue/IDEA-172253

0

What on earth is the workflow for a normal user in PHPStorm?

I tried to use PHPStorm remotely but git does not work. So I went to windows to try to develop locally. My application uses memcached which is not on Windows, so I can't run PHPStorm natively. I tried to install Ubuntu, but multi-monitor support is non-existant, and you can't just plug in an HDMI cord and expect your computer to not blow up when you have a nvidia card. So that ruled out just installing Ubuntu. Finally, I find this WSL thing and try to get it to go, but can not get git to run.

Am I just out of luck? Is it impossible to actually use PHPStorm? What do I have to do.. D:

0

I am struggling to understand your setup, please help me here.

My application uses memcached which is not on Windows, so I can't run PHPStorm natively

What does it mean exactly? Your application is supposed to be run in Linux, I got that. But what stops you from copying the project to a Windows machine, make changes to the code base, and upload the changes back? Is it necessary for you to perform VCS operations locally?

If so, this case was described here, and there's no 'easy' solution right now.

0

Please sign in to leave a comment.