23maverick23/sublime-jekyll

PermissionError: [Errno 13] Permission denied: 'filename.markdown'

Closed this issue · 5 comments

Summary of issue

System details

  • System Platform: Windows 10 64-bit
  • Sublime Version Build 3103
  • User or Project Settings: Tried both, doesn't seem to work on either one

Sublime console output

error: Jekyll: Unable to resolve path information!

Please double-check that you have defined absolute paths to your Jekyll directories, or that you have enabled the `jekyll_auto_find_paths` setting.

If you have set your path settings correctly, please copy the console output and create a new issue.

Traceback (most recent call last):
  File "jekyll in C:\Users\sesha\AppData\Roaming\Sublime Text 3\Installed Packages\Jekyll.sublime-package", line 124, in _fn
  File "jekyll in C:\Users\sesha\AppData\Roaming\Sublime Text 3\Installed Packages\Jekyll.sublime-package", line 418, in title_input
  File "jekyll in C:\Users\sesha\AppData\Roaming\Sublime Text 3\Installed Packages\Jekyll.sublime-package", line 494, in create_and_open_file
  File "jekyll in C:\Users\sesha\AppData\Roaming\Sublime Text 3\Installed Packages\Jekyll.sublime-package", line 258, in create_file
PermissionError: [Errno 13] Permission denied: '2016-04-30-hello-world.markdown'
error: Jekyll: Oops! - this is a bit embarassing
        ¯\_(ツ)_/¯ 

You've encountered an unexpected error, which likely means you've found a bug in our code. It would be great if you could copy any related console output into a new issue and send it over to us. We'll take a look and get back to you as soon as we can. Thanks!

When I used it last, it worked on a Windows 8 machine flawlessly. However, currently it is giving this error and sometimes it does not, but creates a file in the Sublime Data Folder (C:\Users\username\AppData\Roaming\Sublime Text 3\Packages\User).

Here is my sublime project settings file:

{
    "folders":
    [
        {
            "folder_exclude_patterns":
            [
                "dest"
            ],
            "path": "D:\\Development\\Ongoing\\Web\\projectname"
        },
        {
            "path": "D:\\Development\\Ongoing\\Web\\addedfolder"
        }
    ],
     "settings":
    {
        "Jekyll":
        {
            "posts_path": "D:\\Development\\Ongoing\\Web\\projectname\\src\\_posts",
            "drafts_path": "D:\\Development\\Ongoing\\Web\\projectname\\src\\_drafts",
            "uploads_path": "D:\\Development\\Ongoing\\Web\\projectname\\src\\uploads",
        }
    }
}

The Preferences file:

"jekyll_posts_path": "D:\\Development\\Ongoing\\Web\\projectname\\src\\_posts",
"jekyll_drafts_path": "D:\\Development\\Ongoing\\Web\\projectnamel\\src\\_drafts",
"jekyll_uploads_path": "D:\\Development\\Ongoing\\Web\\projectnamel\\src\\uploads",
"jekyll_debug": true,

I even tried by using them alternatively (disabling one while using the other)

I would also like to add that I use custom source and destination folders, might that be causing a problem?
From my _config.yml

...
# Build settings
destination: dest
source:      src
markdown:    kramdown
highlighter: pygments
...

@seshaljain Thanks for using the plugin and thanks for all the great detail in your issue! Very much appreciated.

First - some housekeeping - you should update your project settings to support the new settings key syntax (all settings keys should have a jekyll namespace prefix).

That's likely not related to your error though. It looks like your update from Windows 8 to 10 removed some file system permissions. I don't have a Windows machine to test (I'm run a Mac), but there are a bunch of posts all over the interwebs about permissions issues in Windows 10 upgrades.

Can you check that you have full write permission to D:\\Development\\Ongoing\\Web\\projectname and all it's subfolders? Try right-clicking on the folder and reviewing the security tab?

I checked, it has full read/write permissions. Also, the namespace prefix absence was a copy-paste error. Silly me, I did update it in the project file. Still nothing. Thanks in advance!

Hmm...so it looks like your path is not getting set correctly since the error you pasted only shows the post name (and not the full path of where it's trying to write the file).

Can you try setting jekyll_auto_find_paths to true in your Jekyll.sublime-settings file and see if that resolves the error (for now)? If it does, then maybe there is a bug with Windows specific paths I need to address.

Okay. This is now closable. Idiot me thought the .sublime-settings were detected when opening the directory itself. Didn't realize you had to open the project to get the per-project settings.

May want to tweak documentation to reflect that should another idiot roll around. :)

Closing due to inactivity. Please re-open if the issue still persists.