You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
At /usr/share/atom/resources/app/node_modules/pathwatcher/lib/file.js:318
Error: EACCES, permission denied '/etc/hosts'
at Error (native)
at Object.fs.openSync (fs.js:455:18)
at Object.module.(anonymous function) [as openSync] (/usr/share/atom/resources/atom/common/lib/asar.js:422:20)
at Object.fs.writeFileSync (fs.js:1011:15)
at Object.fsPlus.writeFileSync (/usr/share/atom/resources/app/node_modules/fs-plus/lib/fs-plus.js:228:17)
at File.module.exports.File.writeFileSync (/usr/share/atom/resources/app/node_modules/pathwatcher/lib/file.js:234:19)
at File.module.exports.File.writeFileWithPrivilegeEscalationSync (/usr/share/atom/resources/app/node_modules/pathwatcher/lib/file.js:304:21)
at File.module.exports.File.write (/usr/share/atom/resources/app/node_modules/pathwatcher/lib/file.js:293:12)
at TextBuffer.module.exports.TextBuffer.saveAs (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:970:17)
at TextBuffer.module.exports.TextBuffer.save (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:958:19)
at TextEditor.module.exports.TextEditor.save (/usr/share/atom/resources/app/src/text-editor.js:620:26)
at Pane.module.exports.Pane.saveItem (/usr/share/atom/resources/app/src/pane.js:538:16)
at Pane.module.exports.Pane.promptToSaveItem (/usr/share/atom/resources/app/src/pane.js:511:23)
at Pane.module.exports.Pane.destroyItem (/usr/share/atom/resources/app/src/pane.js:456:18)
at HTMLDivElement.<anonymous> (/usr/share/atom/resources/app/node_modules/tabs/lib/tab-bar-view.js:174:22)
at space-pen-ul.jQuery.event.dispatch (/usr/share/atom/resources/app/node_modules/jquery/dist/jquery.js:4430:9)
at space-pen-ul.elemData.handle (/usr/share/atom/resources/app/node_modules/jquery/dist/jquery.js:4116:28)
He's on 176. Looks like we're still having issues on non-osx when it tries to save files the user doesnt have access to. At least the error message could be legit. But we really should implement the privilege escalation on windows and linux.
Define "privilege escalation" on Linux because unless you plan to integrate with polkit I would not recommend you consider "escalating" on Linux because Linux users are well aware of the separation between root and user. That said please do not get crazy on Linux because I do not feel like having to double down on Atom and building profiles to keep it from doing crazy shit like trying to use sudo to write to files because that's a big nono unless it's explicit.
Might I suggest on Linux just sending out one of those popup warnings like: 'This file is not writeable with your permissions, please launch atom with sudo atom or with the user who owns the file sudo -u user atom /path/to/file'
I also have one last question on this topic: Does atom even isolate the damage a plugin can do to the system? In that does it prevent web access unless a manfest file provides an explicit url and permissions for that URL? Does it do anything to prevent uploading data from a project? Does it limit where and what plugins can even access? Because unless that is the case I wouldn't even bother with any escalation unless you plan to escalate an isolated writer and not the entire application (especially on Linux and OS X.)
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
benogle commentedon Feb 5, 2015
From @50Wliu on February 5, 2015 12:59
@iivanovicpu please upgrade to Atom 0.175.0 or above.
benogle commentedon Feb 5, 2015
He's on 176. Looks like we're still having issues on non-osx when it tries to save files the user doesnt have access to. At least the error message could be legit. But we really should implement the privilege escalation on windows and linux.
benogle commentedon Feb 5, 2015
My guess on steps to repro:
xin the tabenvygeeks commentedon Feb 5, 2015
Define "privilege escalation" on Linux because unless you plan to integrate with polkit I would not recommend you consider "escalating" on Linux because Linux users are well aware of the separation between root and user. That said please do not get crazy on Linux because I do not feel like having to double down on Atom and building profiles to keep it from doing crazy shit like trying to use sudo to write to files because that's a big nono unless it's explicit.
benogle commentedon Feb 5, 2015
Windows then :)
envygeeks commentedon Feb 5, 2015
Might I suggest on Linux just sending out one of those popup warnings like: 'This file is not writeable with your permissions, please launch atom with
sudo atomor with the user who owns the filesudo -u user atom /path/to/file'benogle commentedon Feb 5, 2015
It does give a similar error in most cases, I'm not sure why it is throwing an error in this case rather than displaying the nicer message.
envygeeks commentedon Feb 5, 2015
I also have one last question on this topic: Does atom even isolate the damage a plugin can do to the system? In that does it prevent web access unless a manfest file provides an explicit url and permissions for that URL? Does it do anything to prevent uploading data from a project? Does it limit where and what plugins can even access? Because unless that is the case I wouldn't even bother with any escalation unless you plan to escalate an isolated writer and not the entire application (especially on Linux and OS X.)
thedaniel commentedon Feb 5, 2015
@envygeeks #1763 might be of some interest to you. Basically, the answer is "no".
nathansobo commentedon Feb 5, 2015
It would be an isolated reader/writer process I think if we did it.
nathansobo commentedon Feb 5, 2015
For now.
lock commentedon Jan 23, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!