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

Failed to save 'file': A system error occured (EACCES: permission denied, open 'file path') #17860

Closed
Temkit opened this issue Dec 27, 2016 · 12 comments
Assignees
Labels
info-needed Issue requires more information from poster
Milestone

Comments

@Temkit
Copy link

Temkit commented Dec 27, 2016

  • VSCode Version: Code 1.8.1 (ee428b0, 2016-12-19T14:42:49.304Z)
  • OS Version: macOS Sierra x64 10.12.2
  • Extensions:
Extension Author Version
xml DotJoshJohnson 1.6.1
beautify HookyQR 0.6.2
format-indent Kasik96 1.3.0
terminal-tabs Tyriar 0.0.6
vscode-terminal-here Tyriar 0.0.5
html-css-class-completion Zignd 1.0.3
html-snippets abusaidm 0.0.18
Bookmarks alefragnani 0.10.1
project-manager alefragnani 0.12.2
vscode-color anseki 0.2.2
vscode-standard-format chenxsan 0.0.12
python donjayamanne 0.5.5
vscode-html-css ecmel 0.0.30
vscode-npm-script eg2 0.1.5
php-debug felixfbecker 1.10.0
terminal formulahendry 0.0.6
rest-client humao 0.11.2
Angular2 johnpapa 1.0.2
vscode-JS-CSS-HTML-formatter lonefy 0.2.2
MagicPython magicstack 1.0.3
prettify-json mohsen1 0.0.3
debugger-for-chrome msjsdiag 2.4.1
vscode-icons robertohuertasm 4.3.0
launchterminal testingtestingtesting 0.4.0
vscode-react-native vsmobile 0.2.4
bootstrap-3-snippets wcwhitehead 0.0.9
ReactSnippets xabikos 1.2.0

Steps to Reproduce:

1.save a file
2.get an error : Failed to save 'file': A system error occured (EACCES: permission denied, open 'file path')
the thing is that it happend sudenly in the middle of a project, and i can't save anymore !

capture d ecran 2016-12-27 a 7 53 26 pm

@bpasero
Copy link
Member

bpasero commented Jan 2, 2017

@zecide does this reproduce every time you try? are you editing a file that you do not have write permissions to? does it reproduce when you run with extensions disabled (code --disable-extensions from the command line)?

@bpasero bpasero added the info-needed Issue requires more information from poster label Jan 2, 2017
@bpasero bpasero added this to the Backlog milestone Jan 2, 2017
@Temkit
Copy link
Author

Temkit commented Jan 2, 2017

i wasn't able to figure out what was happening, so i migrated my files to a new project and every thinks goes fine, was not a permission issue, and neither an extension !

@bpasero
Copy link
Member

bpasero commented Jan 2, 2017

Ok please reopen when it happens again.

@bpasero bpasero closed this as completed Jan 2, 2017
@Temkit
Copy link
Author

Temkit commented Jan 8, 2017

i know what was the problem :
i'm working with angular cli, when i generate a component using the ng g c name, if in the terminal iam as root, then the generated files belongs to the root user, when after i go to edit them using vscode as a non root i have this error !

@ishansiddiqui
Copy link

Yes you are right that you have created the files and they have root permissions.
The solution is that i created the main project's folder as 'root' and then given it permissions so that i can create files in it. Those files don't have the root as the owner so it doesn't gives an error of permission denied when we try to save/create files in the editor.
Cheers !!

@JacobHorne
Copy link

Im a little confused. I set up a vue-cli instance and I cannot save.

@vinkhub
Copy link

vinkhub commented May 3, 2017

sudo chmod -R <user_name> <directory_name>

@Dimas-Prasetya
Copy link

if you are using terminal,
login with local user, and then you can run this script

sudo chown -R $USER <directory_project>

@Asura19
Copy link

Asura19 commented Aug 18, 2017

Thank you @Dimas-Prasetya , it works!!!

@Dimas-Prasetya
Copy link

@Asura19 you're welcome

@Graystripe17
Copy link

Yeah this happened as I was editing my first file switching from Vim. Not a good impression :/

@ricardomaleixo
Copy link

this is the solution to me.

access terminal with root and ...

code --user-data-dir="./vscode-root"

ubuntu 16.04

flw.vlw

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

9 participants