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 remote python command for checking system registered with sudo #225

Merged
merged 1 commit into from
Oct 28, 2019

Conversation

jlausuch
Copy link
Contributor

@jlausuch jlausuch commented Oct 28, 2019

In EC2, while running that command it gives an error:

python3 -c 'from cloudregister import registerutils;
> print(registerutils.is_registered(registerutils.get_current_smt()))'
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/usr/lib/python3.4/site-packages/cloudregister/registerutils.py", line 442, in get_current_smt
    smt = get_smt_from_store(__get_registered_smt_file_path())
  File "/usr/lib/python3.4/site-packages/cloudregister/registerutils.py", line 588, in get_smt_from_store
    with open(smt_store_file_path, 'rb') as smt_file:
PermissionError: [Errno 13] Permission denied: '/var/lib/cloudregister/currentSMTInfo.obj'

Running the same command with sudo grants access to that file and the tests passes.

In EC2, while running that command it gives an error with
PermissionError: [Errno 13] Permission denied:
    '/var/lib/cloudregister/currentSMTInfo.obj'
Running the same command with sudo grants access to that file.
@jlausuch
Copy link
Contributor Author

@smarlowucf @cfconrad

@smarlowucf smarlowucf merged commit 92129c0 into SUSE-Enceladus:master Oct 28, 2019
@smarlowucf
Copy link
Collaborator

Thanks @jlausuch

@jlausuch jlausuch deleted the fix_cloudregister_ec2 branch October 29, 2019 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants