Git Product home page Git Product logo

Comments (11)

michalvasko avatar michalvasko commented on June 24, 2024

What sysrepo version are you using? Can you post the owner/group/permissions of your sysrepo repository and directories in it?

from sysrepo.

tbsuht avatar tbsuht commented on June 24, 2024

It's 2.2.148.

# ls -al /etc/sysrepo
total 4
drwxr-xr-x 1 root root  240 Jan  1 00:00 .
drwxr-xr-x 1 root root   60 Jan  1 00:00 ..
drwxrwxrwx 1 root root  120 Jan  1 01:36 conn
drwxrwxrwx 1 root root   80 Jan  1 00:00 data
prw--w--w- 1 root root    0 Jan  1 00:00 sr_evpipe1
prw--w--w- 1 root root    0 Jan  1 00:00 sr_evpipe2
prw--w--w- 1 root root    0 Jan  1 00:00 sr_evpipe3
prw--w--w- 1 root root    0 Jan  1 00:00 sr_evpipe4
prw--w--w- 1 root root    0 Jan  1 00:00 sr_evpipe5
prw--w--w- 1 root root    0 Jan  1 00:00 sr_evpipe6
prw--w--w- 1 root root    0 Jan  1 00:00 sr_evpipe7
-rw-rw-rw- 1 root root    0 Jan 26  2024 sr_main_lock
drwxr-xr-x 3 root root 4096 Jan 26  2024 yang

from sysrepo.

michalvasko avatar michalvasko commented on June 24, 2024

Have you used (set) SYSREPO_GROUP compilation variable?

from sysrepo.

tbsuht avatar tbsuht commented on June 24, 2024

No, only SRPD_PLUGINS_PATH and SYSTEMD_UNIT_DIR are used during compilation.

from sysrepo.

michalvasko avatar michalvasko commented on June 24, 2024

Okay, then if you have set SYSREPO_GROUP to sysrepo-networking, it should have worked (but then all the sysrepo process owners should be a member of this group, which seems is the purpose of it in your case). You should be able to fix it manually by running

sudo chown root:sysrepo-networking /etc/sysrepo
sudo chown root:sysrepo-networking /etc/sysrepo/conn
sudo chown root:sysrepo-networking /etc/sysrepo/data
sudo chown root:sysrepo-networking /etc/sysrepo/yang

from sysrepo.

tbsuht avatar tbsuht commented on June 24, 2024

chmod g+w /etc/sysrepo was missing for testing it, now its working thanks! :)

I guess this is available if I compile it with SYSREPO_GROUP=sysrepo-networking?

from sysrepo.

michalvasko avatar michalvasko commented on June 24, 2024

Then all these directories should automatically be created with the specified group as owner so you always have access to them.

from sysrepo.

tbsuht avatar tbsuht commented on June 24, 2024

Perfect, thanks!

from sysrepo.

tbsuht avatar tbsuht commented on June 24, 2024

@michalvasko I need to reopen this.

After compiling sysrepo with SYSREPO_GROUP=sysrepo-owner it looks like this:

# ls -al /etc/sysrepo
total 4
drwxr-xr-x 1 root root           260 Jan  1 00:00 .
drwxr-xr-x 1 root root            80 Jan  1 00:00 ..
drwxrwxrwx 1 root sysrepo-owner  140 Jan  1 00:00 conn
drwxrwxrwx 1 root sysrepo-owner   60 Jan  1 00:00 data
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe10
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe11
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe12
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe13
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe2
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe7
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe8
prw--w--w- 1 root root             0 Jan  1 00:00 sr_evpipe9
-rw-rw-rw- 1 root sysrepo-owner    0 Jan 29  2024 sr_main_lock
drwxr-xr-x 3 root root          4096 Jan 29  2024 yang

Shouldn't /etc/sysrepo (REPO_PATH) also be owned by root:sysrepo-owner now?

I will still get the error above until I do:

chown root:sysrepo-owner /etc/sysrepo
chmod g+w /etc/sysrepo

from sysrepo.

michalvasko avatar michalvasko commented on June 24, 2024

I expect the repository existed before. sysrepo just checks the existence/access to the directories and if it is fine, it leaves them as they are. Only when creating them it sets all the correct permissions on them. It seemed like this less-intrusive behavior is desired because it avoids problems when the user wants to use different permissions for some reason.

from sysrepo.

tbsuht avatar tbsuht commented on June 24, 2024

You're right, thanks!

from sysrepo.

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.