Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught Error: EACCES, permission denied '/etc/hosts' #116

Closed

Description

@iivanovicpu

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.176.0
System: linux 3.16.0-30-generic
Thrown From: tabs package, v0.64.0

Stack Trace

Uncaught Error: EACCES, permission denied '/etc/hosts'

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)

Commands

  3x -0:35.8 core:move-down (atom-text-editor.editor)
     -0:33.5 editor:newline (atom-text-editor.editor)
     -0:33.2 core:move-up (atom-text-editor.editor)
     -0:32.1 core:paste (atom-text-editor.editor)
     -0:30.2 snippets:next-tab-stop (atom-text-editor.editor)
     -0:30.2 snippets:expand (atom-text-editor.editor)
     -0:30.2 editor:indent (atom-text-editor.editor)
     -0:14.5 core:save (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
No installed packages

# Dev
No dev packages

/cc @atom/core

Activity

  1. winstliu commented on Feb 5, 2015

    @winstliu
    Contributor

    @iivanovicpu please upgrade to Atom 0.175.0 or above.

  2. reopened this on Feb 5, 2015
  3. benogle commented on Feb 5, 2015

    @benogle
    Contributor

    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.

  4. benogle commented on Feb 5, 2015

    @benogle
    Contributor

    My guess on steps to repro:

    1. have etc/hosts open unsaved
    2. Click on the x in the tab
    3. it prompts to save, you choose yes, save
    4. Fail
  5. benogle commented on Feb 5, 2015

    @benogle
    Contributor

    This issue was moved to atom/atom#5421

  6. winstliu commented on Feb 5, 2015

    @winstliu
    Contributor

    Hmm I somehow read 0.174 by accident.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions