Comments (11)
What sysrepo version are you using? Can you post the owner/group/permissions of your sysrepo repository and directories in it?
from sysrepo.
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.
Have you used (set) SYSREPO_GROUP
compilation variable?
from sysrepo.
No, only SRPD_PLUGINS_PATH
and SYSTEMD_UNIT_DIR
are used during compilation.
from sysrepo.
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.
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.
Then all these directories should automatically be created with the specified group as owner so you always have access to them.
from sysrepo.
Perfect, thanks!
from sysrepo.
@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.
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.
You're right, thanks!
from sysrepo.
Related Issues (20)
- Get on /ietf-netconf-acm:nacm fails without a get on /sysrepo-monitoring:sysrepo-state/connection/nacm-stats HOT 1
- Does libsysrepo-API not support access to multiple YANG databases of sysrepo? HOT 4
- Cannot change value using sr_apply_changes HOT 2
- `--init-data` fails validation on `min-elements` list HOT 2
- sysrepoctl YANG parse issue HOT 1
- Not able to fetch value operational data HOT 12
- factory-reset behavior HOT 2
- Spurious oper data callbacks on sr_get_items HOT 2
- `headers` test error: `Missing #include "compat.h" in file src/plugins/ds_mongo.c for function asprintf()`, and in `ds_redis.c` as well HOT 1
- Path is modified in ietf-netconf-acm module and it causes the nacm function to fail. HOT 8
- sr_apply_changes function return value HOT 6
- Question: can we subscribe to get-config and edit-config? HOT 2
- question: can we parse and print edit-config or edit-data before pushing into the sysrepo database. HOT 16
- installing the yang files with sysrepo HOT 3
- Unauthorized list entry deletion leaks information about datanode presence HOT 5
- When will 'sr_get_changes' be applied? HOT 4
- Installation error on openWRT 23.05 HOT 3
- Callback Function Receives Original Configuration During Deletion Despite Field Modification HOT 6
- Redundant parameters HOT 9
- Question about sr_connect performance HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sysrepo.