Skip to content

permission denied on 2.5.0beta #5483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gibeautc opened this issue Dec 12, 2018 · 14 comments
Closed

permission denied on 2.5.0beta #5483

gibeautc opened this issue Dec 12, 2018 · 14 comments

Comments

@gibeautc
Copy link

Basic Infos

  • [ x] This issue complies with the issue POLICY doc.
  • [x ] I have read the documentation at readthedocs and the issue is not addressed there.
  • [x ] I have tested that the issue is present in current master branch (aka latest git).
  • [x ] I have searched the issue tracker for a similar issue.
  • [x ] If there is a stack dump, I have decoded it.
  • [ x] I have filled out all fields below.

Platform

  • Hardware: [ESP-12|]
  • Core Version: [latest git hash or date]
  • Development Env: [Arduino IDE]
  • Operating System: [Ubuntu]

Settings in IDE

  • Module: [Generic ESP8266 Module|Wemos D1 mini r2|Nodemcu|other]
  • Flash Mode: [qio|dio|other]
  • Flash Size: [1MB]
  • lwip Variant: [v1.4]
  • Reset Method: [nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200|other] (serial upload only)

Problem Description

Detailed problem description goes here.

When compiling any code, I get a permission denied error like so
.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py: permission denied
Permisions for that folder looked fine, but I even did a chmod 777 on the entire directory to see if that would change anything, it did not.

This is with the latest beta version of the board info (2.5.0beta)
When I downgrade it to the previous version, it works fine.

Debug Messages

Debug messages go here

.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py: permission denied

@earlephilhower
Copy link
Collaborator

Looks like a paranoid system configuration. Can you give the full OS config?

I'm assuming you're running from a Linux/UNIX-like system, yes? And there is a "~/" before the ".arduino15" that you've not copied? If not, then maybe your Arduino copy is having trouble with $(HOME)

From a bash prompt, please try
python ~/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py

.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py

Both should give some form of "ERROR: Mode not specified..." message.

If they don't, then could you have the Arduino tree on a filesystem mounted as NOEXEC (so that nothing can run from it?). Another possibility is a SELINUX enforcing mode config that doesn't allow executing the file.

@earlephilhower earlephilhower self-assigned this Dec 12, 2018
@earlephilhower earlephilhower added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Dec 12, 2018
@Swiftnesses
Copy link

Swiftnesses commented Dec 12, 2018

Samer problem here on OSX (Mojave), will try suggestions and revert.

Install was done via board manager.

UPDATE: Solved by issuing command:

chmod u+rwx /Users/xxx/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py

@gibeautc
Copy link
Author

gibeautc commented Dec 12, 2018 via email

@theflyingfijian
Copy link

Samer problem here on OSX (Mojave), will try suggestions and revert.

Install was done via board manager.

UPDATE: Solved by issuing command:

chmod u+rwx /Users/xxx/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py

Worked like a charm :)

@wabbitguy
Copy link

Same thing on Mac OS High Sierra and the suggested command in the terminal worked perfectly. Thanks @Swiftnesses

@Swiftnesses
Copy link

Welcome guys, glad I could help :)

@earlephilhower
Copy link
Collaborator

Yup, looks like there is a packaging issue in the IDE installed package. Deleting my GIT copy and using the boards manager to install 2.5.0-b1 I too see:

fork/exec /home/earle/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py: permission denied
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.

# ls -l /home/earle/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py
-rw-rw-r-- 1 earle earle 2832 Dec 11 15:25 /home/earle/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py

The GIT version itself has the +x bit set on the file, so I'll have to peek at our packing script...

@earlephilhower
Copy link
Collaborator

image

@earlephilhower
Copy link
Collaborator

Actually, it;s even worse. The packaged platform.txt is missing many lines vs. the GIT repo!

earle@server:~/.arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/git/Arduino$ git diff
diff --git a/platform.txt b/platform.txt
index 30eece5..6a42b8e 100644
--- a/platform.txt
+++ b/platform.txt
@@ -5,11 +5,11 @@
 # For more info:
 # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
 
-name=ESP8266 Boards (2.5.0-dev)
-version=2.5.0-dev
+name=ESP8266 Boards (2.5.0-beta1)
+version=2.5.0-beta1
+
+
 
-runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf
-runtime.tools.esptool.path={runtime.platform.path}/tools/esptool
 runtime.tools.signing={runtime.platform.path}/tools/signing.py
 
 compiler.warning_flags=-w
@@ -76,14 +76,14 @@ compiler.elf2hex.extra_flags=
 
 ## generate file with git version number
 ## needs bash, git, and echo
-recipe.hooks.core.prebuild.1.pattern=bash -c "mkdir -p {build.path}/core && echo \#define ARDUINO_ESP8266_GIT_VER 0x`git --git-dir {runtime.platform.path}/.git rev-parse --short=8 HEAD 2>/dev/null || echo ffffffff` >{build.path}/core/core_version.h"
-recipe.hooks.core.prebuild.2.pattern=bash -c "mkdir -p {build.path}/core && echo \#define ARDUINO_ESP8266_GIT_DESC `cd "{runtime.platform.path}"; git describe --tags 2>/dev/null || echo unix-{version}` >>{build.path}/core/core_version.h"
-recipe.hooks.core.prebuild.3.pattern="{runtime.tools.signing}" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"
+
+
+
 
 ## windows-compatible version without git
-recipe.hooks.core.prebuild.1.pattern.windows=cmd.exe /c mkdir {build.path}\core & (echo #define ARDUINO_ESP8266_GIT_VER 0x00000000 & echo #define ARDUINO_ESP8266_GIT_DESC win-{version} ) > {build.path}\core\core_version.h
-recipe.hooks.core.prebuild.2.pattern.windows=cmd.exe /c if exist {build.source.path}\public.key echo #error Cannot automatically build signed binaries on Windows > {build.path}\core\Updater_Signing.h
-recipe.hooks.core.prebuild.3.pattern.windows=
+
+
+
 
 ## Build the app.ld linker file
 recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{build.path}/local.eagle.app.v6.common.ld"
@@ -130,7 +130,7 @@ recipe.size.regex.data=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).*
 
 tools.esptool.cmd=esptool
 tools.esptool.cmd.windows=esptool.exe
-tools.esptool.path={runtime.platform.path}/tools/esptool
+tools.esptool.path={runtime.tools.esptool.path}
 tools.esptool.network_cmd=python
 tools.esptool.network_cmd.windows=python.exe
 
@@ -142,4 +142,4 @@ tools.esptool.upload.network_pattern="{network_cmd}" "{runtime.platform.path}/to
 
 tools.mkspiffs.cmd=mkspiffs
 tools.mkspiffs.cmd.windows=mkspiffs.exe
-tools.mkspiffs.path={runtime.platform.path}/tools/mkspiffs
+tools.mkspiffs.path={runtime.tools.mkspiffs.path}

earlephilhower added a commit to earlephilhower/Arduino that referenced this issue Dec 13, 2018
The boards packager was deleting what was at the time it was written
unused lines in fht platform.txt file before deploying to Arduino.
One of these lines is now needed for signing to work, so don't delete
it.

Also, explicitly call "python signing.py" because it looks like Arduino
is sanitizing/removing executable bits on files when extracting from
boards manager installations.

Fixes esp8266#5483
@earlephilhower earlephilhower added type: bug component: packaging and removed waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. labels Dec 13, 2018
devyte pushed a commit that referenced this issue Dec 13, 2018
* Keep signing commands in platform.txt on release

The boards packager was deleting what was at the time it was written
unused lines in fht platform.txt file before deploying to Arduino.
One of these lines is now needed for signing to work, so don't delete
it.

Also, explicitly call "python signing.py" because it looks like Arduino
is sanitizing/removing executable bits on files when extracting from
boards manager installations.

Fixes #5483

* Create the build subdir, if needed, for autosign

If the temporary build/core directory isn't available, make it in order
that Updater.cpp will see the generated signing header and not the one
in the main core.
@a-x-
Copy link

a-x- commented Dec 14, 2018

Still actual

hack to fix (more general solution than @Swiftnesses's):

chmod u+rwx $HOME/Library/Arduino15/packages/esp8266/hardware/esp8266/2.5.0-beta1/tools/signing.py

@earlephilhower
Copy link
Collaborator

Until -beta2 is released this is not going to show up ini tour board-manager installs.

However, the fix doesn't actually amke signing work. The platform.txt file needs to be corrected, which is that the PR does and you'll get with the next beta.

@a-x-
Copy link

a-x- commented Dec 14, 2018

Why beta versions available in stable update channel?

@devyte
Copy link
Collaborator

devyte commented Dec 14, 2018

@a-x- I suggest reading our release model.

  1. It's a release channel, not a "stable" release channel.
  2. The term "stable release" usually refers to the head of a version branch, where the branch base is the base release, and commits after that are only bug fixes. Hence, releases from that branch are usualy progressivley stable. We don't follow that release model, as explained in the link above. That means we don't do "stable" releases, we just do releases.
  3. Beta releases require wide testing (that's actually true of all releases, but betas more so). Wide testing requires exposure to users. Exposure to users means the release must be made available through all channels.
  4. The fact that the release version explicitly says "beta" should be enough for users to expect some issues. It's up to each user to decide installing, testing, reporting issues, and helping out with fixing them.

@aahco
Copy link

aahco commented Mar 1, 2019

I have spend a few day with different versions old and new, any kind of config none of working.

Why this that happen with esp-01 since i have remember off and on bump with uploading code we got error: espcomm_open failed.

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

No branches or pull requests

8 participants