You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I maybe have a special use case here, but I'm calling this script/module a bit different.
The execution order is like this:
User "A" executes some kind of proxy script
Proxy Script, internally, changes to a User "B"
Proxy Script, with User "B" permissions, finally executes ciscoconfparse
Imagine the above like some sort of sudo.
But this then results in the follwing error:
File "venv/lib/python3.12/site-packages/ciscoconfparse/ciscoconfparse.py", line 4076, in __init__
_ = yaml.load(open('./options_ios.yml'), Loader=yaml.SafeLoader)
│ │ │ └ <class 'yaml.loader.SafeLoader'>
│ │ └ <module 'yaml' from 'venv/lib/python3.12/site-packages/yaml/__init__.py'>
│ └ <function load at 0x7f1e1c4fa840>
└ <module 'yaml' from 'venv/lib/python3.12/site-packages/yaml/__init__.py'>
PermissionError: [Errno 13] Permission denied: './options_ios.yml'
And this error is caused by the fact, that CWD is still the one of User "A", in which User "B" has no read permissions at all.
So checking for ./options_ios.yml in CWD might be not ideal. Can you maybe change this to something more reliable?
Additional Info:
Python Version: 3.12
CiscoConfParse Version
1.9.51
What Operating System are you using?
Linux - Debian, Ubuntu, CentOS, RHEL or others
What Python version(s) have this problem?
Other (please specify)
Show us how to reproduce the problem. Please tell us if the problem is specific to certain inputs or situations.
Contact Details
No response
What happened?
I maybe have a special use case here, but I'm calling this script/module a bit different.
The execution order is like this:
Imagine the above like some sort of sudo.
But this then results in the follwing error:
And this error is caused by the fact, that CWD is still the one of User "A", in which User "B" has no read permissions at all.
So checking for
./options_ios.yml
in CWD might be not ideal. Can you maybe change this to something more reliable?Additional Info:
CiscoConfParse Version
1.9.51
What Operating System are you using?
Linux - Debian, Ubuntu, CentOS, RHEL or others
What Python version(s) have this problem?
Other (please specify)
Show us how to reproduce the problem. Please tell us if the problem is specific to certain inputs or situations.
-
Python tracebacks
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: