Skip to content
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

Run yangvalidator as yang user/group #80

Closed
SlavomirMazurPantheon opened this issue Jan 5, 2022 · 0 comments · Fixed by #82 or #83
Closed

Run yangvalidator as yang user/group #80

SlavomirMazurPantheon opened this issue Jan 5, 2022 · 0 comments · Fixed by #82 or #83
Assignees
Labels
bug Something isn't working Priority: High

Comments

@SlavomirMazurPantheon
Copy link
Contributor

Problem:
yangvalidator app is currently running as root, which results in permission error in removeUnused.py script while trying to delete old yangvalidator cache files.

Traceback (most recent call last):
  File "/backend/utility/removeUnused.py", line 219, in <module>
    raise e
  File "/backend/utility/removeUnused.py", line 126, in <module>
    shutil.rmtree(os.path.join(yang_validator_cache, dir))
  File "/usr/local/lib/python3.9/shutil.py", line 718, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 675, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/local/lib/python3.9/shutil.py", line 673, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'nokia-conf.yang'

These are helper files which are copied into cache directories during validation.

Possible solution:
If application will be running under yang user/group, these files will be also created/copied under this user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: High
Projects
None yet
1 participant