Closed vkupar closed 8 years ago
@vatex any chance that you are running code with less permissions compared to your user level permissions?
@bpasero I don't know. I set up ubuntu yesterday. I'm logged in as root and I don't know permissions. can you give me suggestion how to run VSC?
@vatex are you able to write into the /home/lingwing/ directory from a prompt?
@bpasero now I have installed in /home/user/Desktop/VSCode here. ok I will try but I don't trust to it helps :/
@bpasero I tried what you suggest me but it doesn't work :(
@vatex I think that vscode does not have permissions to write to the home directory so I asked if you can create a file in the home directory:
now I write sudo touch test.txt and it works.
@vatex yeah sorry, the "~" was too much, what happens when you just "touch test.txt" without being sudo?
@bpasero
touch: cannot touch ‘test.txt’: Permission denied
and how can I give permission to visual studio code?
@vatex so this indicates to me that your home directory cannot be changed without root permissions but code itself is started with user permissions and then fails. There are two solutions:
second solution tried and doesn't work and I will try first and then write here my result
@bpasero now I don't have problem in opening but now program doesn't work. I captured video and you can saw. out.ogv.zip
@vatex If operating in your home directory needs root permissions, then something is wrong there, it should belong to the respective user account.
That is the first problem we need to fix here, sudo-ing commands because of wrong permissions are likely to mess things up even more at this point.
What does the command line say when you do this:
ls -la /home
@bgse total 12 drwxrwxr-x 3 root root 4096 Jan 22 16:50 . drwxr-xr-x 23 root root 4096 Jan 22 12:02 .. drwxr-xr-x 39 user user 4096 Jan 23 15:39 user
@vatex Okay, looks like the directory itself has the proper permissions. What do the following commands say:
ls -la /home/lingwing
whoami
@bgse ls -la /home/user >> here is a big list whoami >> (user)
@vatex In that big list, does it show that the ".config" directory is owned by "lingwing lingwing" ?
If that is the case, then do:
ls -la ~/.config | grep Code
This should also show that these directories are owned by your user.
@bgse
ls -la /home/user >> drwx------ 26 user user 4096 Jan 23 14:40 .config
ls -la ~/.config | grep Code >> drwx------ 5 root root 4096 იან 22 19:54 Code
@vatex Ok, looks like we may have found the issue. The directory VSCode wants to write to is owned by root, but it should be owned by lingwing. This can be fixed by doing:
chown --recursive lingwing ~/.config/Code
@bgse thank you. it works!
@bgse @bpasero extension installer doesn't work :( I seen permissions and everything is ok but why doesn't installs I don't know
@vatex I guess now you have the same problem with Code not being able to write to ~/.vscode/extensions. Since this is not a Code issue, I am closing this one.
I have a problem. when I run visual studio code, error is running:
Uncaught Exception: Error: EACCES: permission denied, mkdir '/home/lingwing/.config/Code/User' at Error (native) at Object.fs.mkdirSync (fs.js:799:18) at Object. (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/workbench/electron-main/main.js:7:6141)
at e._invokeFactory (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/loader.js:4:13773)
at e._complete (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/loader.js:4:14012)
at e.resolveDependency (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/loader.js:4:15066)
at e._onModuleComplete (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/loader.js:4:21390)
at e._onModuleComplete (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/loader.js:4:21434)
at e._onModuleComplete (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/loader.js:4:21434)
at e._resolve (/home/lingwing/Desktop/visual-studio-code/resources/app/out/vs/loader.js:4:26292)