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

Test: running vscode with gksudo or sudo permission #5062

Closed
2 tasks done
Tyriar opened this issue Apr 7, 2016 · 2 comments
Closed
2 tasks done

Test: running vscode with gksudo or sudo permission #5062

Tyriar opened this issue Apr 7, 2016 · 2 comments

Comments

@Tyriar
Copy link
Member

Tyriar commented Apr 7, 2016

Test plan for #3068

  • Test Ubuntu
  • Test Fedora

Basic test case

sudo mkdir ~/perms-test
sudo touch ~/perms-test/file
sudo code-alpha --user-data-dir ~/root-data-dir ~/perms-test
# edit and save `file` in vscode

Known limitations

  • Files can only be saved if the root user has write access, you can check file permissions using ls -la. Example output gives -rw-r--r-- which means user read/write, group read, all read. If the 'daniel' user owns this file, 'root' will be able to read but not save.
  • Opening the browser via vscode will hang the editor, see Calls to shell.openExternal hang vscode when running as root user #5063
@egamma egamma mentioned this issue Apr 7, 2016
68 tasks
@aeschli aeschli added this to the April 2016 milestone Apr 26, 2016
@aeschli
Copy link
Contributor

aeschli commented Apr 26, 2016

Running sudo code-alpha --user-data-dir ~/root-data-dir ~/perms-test results in

It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument.

sudo code-alpha --user-data-dir=~/root-data-dir ~/perms-test, however, works.

@Kowus
Copy link

Kowus commented Sep 2, 2016

I use Ubuntu 14.04.5 x86 and "code-alpha" isn't a recognized command. However, when I run

sudo code --user-data-dir=~/root-data-dir ~/perms-test, it worked

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants