Giter Club home page Giter Club logo

Comments (7)

rina23q avatar rina23q commented on June 15, 2024

Hi Artur, can you change the owner of the directory mosquitto-conf to tedge:tedge? CLI tedge connect can't write a file in a directory owned by root.
Namely, run sudo chown tedge:tedge /etc/tedge/mosquitto-conf.

from thin-edge.io.

toewsar avatar toewsar commented on June 15, 2024

Hi,
that wasn't the problem. I fixed it for me, but I think there should be a general solution.

I tried almost erverything. I also changed the ownership of the directories to default:

$ chown -R tedge:tedge /etc/tedge
$ chown -R mosquitto:mosquitto /etc/tedge/device-certs

But at least I had do set the TMPDIR to the same filesystem than /etc/tedge.
My /tmp is mounted as tmpfs but /etc is mounted as ubifs.
The following line was the final successful trial.

$ mkdir /etc/tedge/tmp
$ chwon tedge:tedge /etc/tedge/tmp
$ TMPDIR=/etc/tedge/tmp tedge connect c8y

The problem seems to be the rename() which is called in persist_tempfile().

from thin-edge.io.

didier-wenzek avatar didier-wenzek commented on June 15, 2024

Indeed your root cause analysis is correct. The configuration files are created as temporary files then renamed. That cannot be done across file-systems.

=> One needs to create the temporary file along the target file in the same directory.

from thin-edge.io.

toewsar avatar toewsar commented on June 15, 2024

Yes, that's what I've done with TMPDIR. But that seems to be not professional.

from thin-edge.io.

didier-wenzek avatar didier-wenzek commented on June 15, 2024

I might have been confusing. tedge connect will be fixed asap.

from thin-edge.io.

didier-wenzek avatar didier-wenzek commented on June 15, 2024

A fix has been merged. Can you, please, double check that the connect command is now working as expected on your device.

from thin-edge.io.

toewsar avatar toewsar commented on June 15, 2024

The latest version works fine, thank you.

from thin-edge.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.