question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'dat create' throws permission error on Windows

See original GitHub issue

OS: Windows 10 Pro 64-bit (10.0, Build 14393)

$ node -v
v8.9.0

$ dat -v
13.9.2

$ dat create
Welcome to dat program!
You can turn any folder on your computer into a Dat.
A Dat is a folder with some magic.

Your dat is ready!
We will walk you creating a 'dat.json' file.
(You can skip dat.json and get started now.)

Learn more about dat.json: https://github.com/datprotocol/dat.json

Ctrl+C to exit at any time

Title:  foobar
Description:
{ Error: EPERM: operation not permitted, rename 'C:\Users\Sam\dat\dat.json.0.31154862242066184' -> 'C:\Users\Sam\dat\dat.json'
  errno: -4048,
  code: 'EPERM',
  syscall: 'rename',
  path: 'C:\\Users\\Sam\\dat\\dat.json.0.31154862242066184',
  dest: 'C:\\Users\\Sam\\dat\\dat.json' }

$ ls -lah
total 30K
drwxr-xr-x 1 Sam 197121   0 Nov  4 16:36 .
drwxr-xr-x 1 Sam 197121   0 Nov  4 16:36 ..
drwxr-xr-x 1 Sam 197121   0 Nov  4 16:36 .dat
-rw-r--r-- 1 Sam 197121  23 Nov  4 16:36 dat.json
-rw-r--r-- 1 Sam 197121 129 Nov  4 16:36 dat.json.0.31154862242066184

The dest file does get created, but the path file is never removed.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
okdistributecommented, Nov 5, 2017

Oh yeah windows has fun rules around renaming files.

0reactions
joehandcommented, Jan 30, 2018

Hmmm, thanks @samuelmaddock. Looks like I need to dig into what exactly causes this a bit more.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Denied access to *.dat files, why? How to solve it? - MSDN
I have a vb net application built in visual studio in which I use a *.dat file for storing information. In debug all...
Read more >
Permission denied error while writing to a file in Python
Permission denied simply means the system is not having permission to write the file to that folder. Give permissions to the ...
Read more >
Permission Denied When Creating Directory or Writing a File
Change the ownership of the directory with the chown command before trying to write to it. We recommend the first solution. If you...
Read more >
permissions in ntuser.dat are getting lost - Citrix Discussions
Hi forum, Sometimes when user is logging on to terminalserver the user is getting the errormessage "access denied" from group policy client.
Read more >
Python PermissionError: [errno 13] permission denied Solution
To fix this error, use the chmod or chown command to change the permissions of the file so that the right user and/or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found