Unable to add ACME provider to the providers list: unable to get ACME account: chmod acme.json: not supported by windows

I'm running Traefik on Windows.

I hit this error, and I finally just said, "I'm going to see if there's anything I could do in source." Well, there is :slight_smile:

You can remove the "chmod" command in source and rebuild the whole thing:

pkg/provider/acme/local_store_windows.go (git)

  • line 15
  • replace the "f.chmod(0600)" with "err", so the whole like is just "return false, err"

There's a note at the top of that file that says:
"// Do not check file permissions on Windows right now"

  • But obviously it still does :slight_smile:

I am super-new to Go, but that did allow me to at least get the acme certresolver to get passed that error.

I suppose one could make that case that this is a bug that could be fixed and added to the next release, but I'll stop short of advocating for that, since I don't feel familiar enough with all the factors that could be involved.

To rebuild Traefik, make sure you have the proper line endings on the makefile.sh script (dos2unix is your friend if you're running Linux in WSL2... which is another point... you have to run WSL2, so you can install Docker and have it get passed the iptables setup. Then, just run either of the following:

  • make crossbinary-default (to get Windows binaries)
  • make binary (to get other Linux)
  • Then look in the "dist" folder for the exe

Hello,

on Windows it's possible to manage the permissions on a file to get the expected permissions.

Remove the chmod(0600) it's a not a real solution.

I didn't realize it's possible to get similar permissions in Windows (that would return something simillar to chmod). I'll agree - the "remove the chmod bit" is not a real solution.

I'm going to try one of these:

So how can I make the ACME provider work with Traefik v2 on Windows? Not possible at the moment?

Edit: A workaround is to create an empty acme.json file...