Filesystem Permission denied when saving keys

I have the same problem of denial of access when trying to create a local cloud. I have the spark -server configured but not let me create new credentials. I made factory to start from scratch but I get so again :

Make sure your core is in DFU mode ( blinking yellow ) , and That your computer is online .
Error - Error : Command failed: 55ff73065075555345561687_new.pem : Permission denied
3074127548 : error : 0200100D : system library : fopen : Permission denied : bss_file.c : 398: fopen ( ’ 55ff73065075555345561687_new.pem ', ’ w ’ )
3074127548 : error : 20074002 : BIO routines : FILE_CTRL : system lib: bss_file.c : 400:

Checked that is in DFU Mode does not work.

Can you help me with the steps taken in your case?

Hi @jairos,

It looks like you’re getting a file permission error when trying to save that key file. It could be that file already exists and is in use, or your user doesn’t have permission to create files, or your disk is out of space, etc, etc.

Thanks,
David

Thank.

As far as the core spark permitted me ( not working properly) was working with the web IDE performing some examples but I tried to implement the local cloud and possibly create two users (one for spark cloud and another for local cloud ) . How I can start again. I have tried to make the factory mode and leave some errors :

Done!  Your core should now restart.

Please wait until your core is breathing cyan and then press ENTER


========================================
Claiming your core

Failed to claim core, server said  [ 'device does not exist' ]
Please wait until your core is breathing cyan and then press ENTER

Failed to claim core, server said  [ 'device does not exist' ]
Please wait until your core is breathing cyan and then press ENTER

Failed to claim core, server said  [ 'device does not exist' ]
Please wait until your core is breathing cyan and then press ENTER
supertienda151@supertienda151-Satellite-Pro-L300D:~/spark-server$ spark setup

========================================
Setup your account

You are already logged in as jairo.sancnezf@gmail.com
Logged in!  Saving access token: SOME_ACCESS_TOKEN

----------------------
Finding your core id

Press and hold the MODE button until your core blinks solid blue

 - Is your core blinking blue?  Then press ENTER - Potentially unhandled rejection [2] Timed out (WARNING: non-Error used)
Something went wrong Serial timed out
Potentially unhandled rejection [4] Serial timed out (WARNING: non-Error used)
Potentially unhandled rejection [5] Serial timed out (WARNING: non-Error used)

Your core id is: 55ff73065075555345561687
Your core id is 55ff73065075555345561687

========================================
Setup your wifi

SSID: Movistar_82522402
Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2: 2
Wifi Password: 00951896397
Attempting to configure wifi on /dev/ttyACM0
I said: w
Serial said: SSID: 
I said: Movistar_82522402

Serial said: Movistar_82522402
Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2: 
I said: 2

Serial said: 2
Password: 
I said: 00951896397

Serial said: 00951896397
Thanks! Wait about 7 seconds while I save those credentials...


Serial said: Awesome. Now we'll connect!

If you see a pulsing cyan light, your Spark Core
has connected to the Cloud and is ready to go!

If your LED flashes red or you encounter any other problems,
visit https://www.spark.io/support to debug.

    Spark <3 you!


Done!  Your core should now restart.

Please wait until your core is breathing cyan and then press ENTER


========================================
Claiming your core

Failed to claim core, server said  [ 'device does not exist' ]
Please wait until your core is breathing cyan and then press ENTER

Failed to claim core, server said  [ 'device does not exist' ]
Please wait until your core is breathing cyan and then press ENTER

Failed to claim core, server said  [ 'device does not exist' ]
Please wait until your core is breathing cyan and then press ENTER

Failed to claim core, server said  [ 'device does not exist' ]
Please wait until your core is breathing cyan and then press ENTER
supertienda151@supertienda151-Satellite-Pro-L300D:~/spark-server$ 

In this final part I requested that the core is in cyan breathing and did not find the device. Indeed the core is in cyan breathing because for the first part

 "
Done! Your core Should now restart.

Please Wait Until your core is breathing cyan and Then press ENTER


========================================
Claiming your core "

the core is in cyan breating but can not find

I try to follow this procedure found in:
http://docs.spark.io/troubleshooting/

Please complete the following steps:

Place the core in Listening Mode
In a command line window / terminal run the command keys spark identify identity to get a list of cores connected to the computer. Make note of the core id (replace core_id With This core id below)
Place the core in DFU Mode
Run the command keys spark Dr. core_id
Spark Your Core Should connect to the network (green, cyan, cyan breathing). If not feel free to contact the Spark team.

My core does not work and dedication these errors in console:
supertienda151 @ supertienda151-Satellite-Pro-L300D: ~ / $ spark spark-server keys identify identity
NAME:
spark keys
DOES:
tools to help you manage keys on your cores

spark new keys - Generate a new set of keys for your core
spark keys load - Load a saved onto disk key on your core
keys spark save - Save a key from your core onto your disk
spark send keys - Tell a key Which server you'd like to use by sending your public key
Dr. spark keys - Creates and ASSIGNS a new key to your core, and uploads it to the cloud
spark keys server - Switch server public keys

supertienda151 @ supertienda151-Satellite-Pro-L300D: ~ / spark-server $ identifyYour core spark id is: 55ff73065075555345561687
supertienda151 @ supertienda151-Satellite-Pro-L300D: ~ / $ spark spark-server keys Dr. 55ff73065075555345561687
running dfu-util -l
1d50 DFU DEVICE FOUND: 607f
running openssl genrsa -out 55ff73065075555345561687_new.pem 1024
Error creating keys … Error: Command failed: 55ff73065075555345561687_new.pem: Permission denied
3073910460: error: 0200100D: system library: fopen: Permission denied: bss_file.c: 398: fopen (‘55ff73065075555345561687_new.pem’, ‘w’)
3073910460: error: 20074002: BIO routines: FILE_CTRL: system lib: bss_file.c: 400:

ake sure your core is in DFU mode (blinking yellow), and That your computer is online.
Error - Error: Command failed: 55ff73065075555345561687_new.pem: Permission denied
3073910460: error: 0200100D: system library: fopen: Permission denied: bss_file.c: 398: fopen (‘55ff73065075555345561687_new.pem’, ‘w’)
3073910460: error: 20074002: BIO routines: FILE_CTRL: system lib: bss_file.c: 400:

supertienda151 @ supertienda151-Satellite-Pro-L300D: ~ / spark-server $

Thank.

Hi @jairos,

Have you tried adding a sudo before you run the keys commands?

Thanks,
David

Hello. Thank you for your help.

I’m not sure I used sudo but now I 'm trying to make a Perform a Full Firmware Upgrade like this in the page ( using sudo ) :

spark flash --factory tinker
spark flash --usb cc3000
spark flash --usb tinker

Hello. Thank you for your help.

I’m not sure I used sudo but now I 'm trying to make a Perform a Full Firmware Upgrade like this in the page ( using sudo ) :
If you are having intermittent connectivity issues, odd behavior or believe your firmware to be corrupted or out of date, you would benefit from performing a full firmware upgrade.

http://support.spark.io/hc/en-us/articles/203108844-Perform-a-Full-Firmware-Upgrade

And I read in the console :
1)
supertienda151@supertienda151-Satellite-Pro-L300D:~$ spark flash --factory tinker
FOUND DFU DEVICE 1d50:607f
checking file /usr/lib/node_modules/spark-cli/binaries/spark_tinker.bin
spawning dfu-util -d 1d50:607f -a 1 -i 0 -s 0x00020000 -D /usr/lib/node_modules/spark-cli/binaries/spark_tinker.bin
dfu-util 0.5

© 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010-2011 Tormod Volden (DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Filter on vendor = 0x1d50 product = 0x607f
Cannot open device
Opening DFU USB device… Error writing firmware…

SUDO
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo spark flash --factory tinker
[sudo] password for supertienda151:
FOUND DFU DEVICE 1d50:607f
checking file /usr/lib/node_modules/spark-cli/binaries/spark_tinker.bin
spawning dfu-util -d 1d50:607f -a 1 -i 0 -s 0x00020000 -D /usr/lib/node_modules/spark-cli/binaries/spark_tinker.bin
dfu-util 0.5

© 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010-2011 Tormod Volden (DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Filter on vendor = 0x1d50 product = 0x607f
Opening DFU USB device… ID 1d50:607f
Run-time device DFU version 011a
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=1, name="@SPI Flash : SST25x/0x00000000/512*04Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #1
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature

Warning: File has no DFU suffix
DfuSe interface name: "SPI Flash : SST25x"
Flashed!
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo spark flash -usb cc3000
Including:
/usr/lib/node_modules/spark-cli/binaries/cc3000-patch-programmer.bin
attempting to flash firmware to your core -usb
flash core said {“error”:“Permission Denied”,“info”:“I didn’t recognize that core name or ID, try opening https://api.spark.io/v1/devices?access_token=ad4a321385708186ebf90a3ec719ecbe7e4639f3”}
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo spark flash --usb cc3000
FOUND DFU DEVICE 1d50:607f
checking file /usr/lib/node_modules/spark-cli/binaries/cc3000-patch-programmer.bin
spawning dfu-util -d 1d50:607f -a 0 -i 0 -s 0x08005000:leave -D /usr/lib/node_modules/spark-cli/binaries/cc3000-patch-programmer.bin
invalid dfuse address: 0x08005000:leave
Error writing firmware…
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo spark flash -usb tinker
Including:
/usr/lib/node_modules/spark-cli/binaries/spark_tinker.bin
attempting to flash firmware to your core -usb
flash core said {“error”:“Permission Denied”,“info”:“I didn’t recognize that core name or ID, try opening https://api.spark.io/v1/devices?access_token=ad4a321385708186ebf90a3ec719ecbe7e4639f3”}
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo spark flash --usb tinker
FOUND DFU DEVICE 1d50:607f
checking file /usr/lib/node_modules/spark-cli/binaries/spark_tinker.bin
spawning dfu-util -d 1d50:607f -a 0 -i 0 -s 0x08005000:leave -D /usr/lib/node_modules/spark-cli/binaries/spark_tinker.bin
invalid dfuse address: 0x08005000:leave
Error writing firmware…
supertienda151@supertienda151-Satellite-Pro-L300D:~$

**

Firmware writing errors occur . I update the DFU -UTIL ?

**

All text is a translation of google translate…excuse me.

version of dfu -util
supertienda151 @ supertienda151 - Satellite -Pro - L300D : ~ $ **dfu -util --version**
**dfu -util 0.5**

( C ) 2005-2008 by Weston Schmidt , Harald Welte and OpenMoko Inc.
( C ) 2010-2011 Tormod Volden ( DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu -util does DFU Currently only support version 1.0

supertienda151 @ supertienda151 - Satellite -Pro - L300D : ~ $

Hello. Thank you for your help.

I’m not sure I used sudo but now I 'm trying to make a Perform a Full Firmware Upgrade like this in the page ( using sudo ) :

And I read in the console :

Firmware writing errors occur . I update the DFU -UTIL ?

version of dfu -util:

supertienda151 @ supertienda151 - Satellite -Pro - L300D : ~ $ dfu -util --version
dfu -util 0.5

( C ) 2005-2008 by Weston Schmidt , Harald Welte and OpenMoko Inc.
( C ) 2010-2011 Tormod Volden ( DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu -util does DFU Currently only support version 1.0

supertienda151 @ supertienda151 - Satellite -Pro - L300D : ~ $

Please, how to update the dfu -util ?. No information meeting for linux / lubuntu .
Thank You

I think you need dfu-util version 0.7 or higher for Spark.

1 Like

@jairos, you can try simply 0x08005000 without the :leave command instead

2 Likes

Please, Where GET updating the DFU -UTIL to Ubuntu ?. It seems that Ubuntu repositories only have to v0.5. Thank.

@kenneth I try : leave without him. As they say in :

supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D core-firmware.bin
[sudo] password for supertienda151:
invalid dfuse address: 0x08005000:leave
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo dfu-util -d 1d50:607f -a 0 -s 0x08005000 -e -D core-firmware.bin
dfu-util: invalid option – 'e’
Usage: dfu-util [options] …
-h --help Print this help message
-V --version Print the version number
-v --verbose Print verbose debug statements
-l --list List the currently attached DFU capable USB devices
-d --device vendor:product Specify Vendor/Product ID of DFU device
-p --path bus-port. … .port Specify path to DFU device
-c --cfg config_nr Specify the Configuration of DFU device
-i --intf intf_nr Specify the DFU Interface number
-a --alt alt Specify the Altsetting of the DFU Interface
by name or by number
-t --transfer-size Specify the number of bytes per USB Transfer
-U --upload file Read firmware from device into
-D --download file Write firmware from into device
-R --reset Issue USB Reset signalling once we’re finished
-s --dfuse-address address ST DfuSe mode, specify target address for
raw file download or upload. Not applicable for
DfuSe file (.dfu) downloads
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo dfu-util -d 1d50:607f -a 0 -s 0x08005000-e -D core-firmware.bin
invalid dfuse address: 0x08005000-e
supertienda151@supertienda151-Satellite-Pro-L300D:~$ sudo dfu-util -d 1d50:607f -a 0 -s 0x08005000 -D core-firmware.bin
dfu-util 0.5

© 2005-2008 by Weston Schmidt, Harald Welte and OpenMoko Inc.
© 2010-2011 Tormod Volden (DfuSe support)
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util does currently only support DFU version 1.0

Filter on vendor = 0x1d50 product = 0x607f
No DFU capable USB device found

**
**
supertienda151@supertienda151-Satellite-Pro-L300D:~$
Thank

Not sure where your -e came from. It should be:

sudo dfu-util -d 1d50:607f -a 0 -s 0x08005000 -D core-firmware.bin

This will be correct. Is you core in DFU mode when you did that?

Command last was -d and -D. Blink yellow for rgb led.

No help me ?. As I can turn off the spark core of the cloud and local network ?. Once the above fact I can reactivate the core spark in the cloud and on the local network ?. Any input would be appreciated.Thank.

@jairos,

I’m not sure of what you are asking. Can you specify what help you need?

I’ll do a summary of this post:

  1. The core spark has not always worked properly:
    http://community.spark.io/t/solved-my-core-spark-died-rest-in-peace/9668

  2. In the post @keithblack
    http://community.spark.io/t/solved-switching-back-to-spark-cloud-submitpublickey-got-error-permission-denied/8915

a problem that was solved and I wonder how it was resolved.

3)@Dave, I think this input and @keithblack not answered my question so I continued my problem.

  1. I have been asked
    If I have the spark core to blink blue,
    if you use sudo before each instruction
    I have some instructions that in the next post will detail entry.

@bko I recommend updating the DFU-UTIL but I could not follow this recommendation. The system does not update.

Working with PC
Ubuntu 14.04,
NodeJS v0.10.33,
Spark v1.0.0
dfu-util v0.5

  1. The original entrance was as follows:
    “I have the same problem of denial of access When trying to create a local cloud I have the spark -server configured but not let me create new credentials I made factory to start from scratch but I get so again:…”

This is the question that I repeat. what credentials do now is remove the cloud and on the local cloud to try to make firmware updates. Can you help me with these steps ?. Thank you for your attention because I’m almost to abandon the project with the core spark.

I have tried to make the factory mode and leave some errors:

Done! Your core Should now restart. <<<<<< Trabaja con el core

Please Wait Until your core is breathing cyan and Then press ENTER

========================================
Claiming your core

Failed to claim core , server Said [ 'device does not exist '] <<<<***<<< No reconoce el core***
Please Wait Until your core is breathing cyan and Then press ENTER

dfu-util is here until the main site is back up:

1 Like

Hi @jairos,

You can also get the latest version of dfu-util here - http://dfu-util.sourceforge.net/ . This process won’t work with dfu-util 0.5, please make sure you’re using a more recent version.

Thanks!
David

1 Like

It seems the world linux is from another universe . For me, not working

Please, no choice ?. I tried with
1) Package Installer Gdebi
2) Synaptic Manager packages .

They find repositories .

3) With Git

$ Sudo git clone git: //git.code.sf.net/p/dfu-util/dfu-util dfu -util - dfu -util

Download packets but does not update

4) Download dfu -util package

https://s3.amazonaws.com/spark-assets/dfu-util-0.8-binaries.tar.xz

How do I install it ?

Thank you for your help.