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

instance creation permission error #71

Open
grantcoultrup opened this issue Mar 14, 2023 · 14 comments
Open

instance creation permission error #71

grantcoultrup opened this issue Mar 14, 2023 · 14 comments

Comments

@grantcoultrup
Copy link

Hi, I am encountering an error creating the first instance.

It looks like error code 13:
PermissionError: [Errno 13] Permission denied: '/home/ampelOctopi1//.e3s1plus/config.yaml'

Even though this error is received, it looks like the instance was still created (for example, I can "delete instance" and this instance is available to be deleted. Same for the associated USB camera.

When running Utility > Instance Status, I see that the instance failed.

Any known fix? Thanks!

Screenshot 2023-03-14 110614

@paukstelis
Copy link
Owner

Can you verify that you have a config.yaml file in ~/.octoprint? You could do this with: ls ~/.octoprint/config.yaml

@paukstelis
Copy link
Owner

Further, you could verify the permissions in that directory: ls -la ~/.octoprint

@grantcoultrup
Copy link
Author

Can you verify that you have a config.yaml file in ~/.octoprint? You could do this with: ls ~/.octoprint/config.yaml

yep I've got config.yaml file.
Screenshot 2023-03-14 at 11 25 54 AM

@paukstelis
Copy link
Owner

If you create a new instance, does that new directory also contain the config.yaml?
ls -la ~/.e3s1plus in your example

@grantcoultrup
Copy link
Author

If you create a new instance, does that new directory also contain the config.yaml?
ls -la ~/.e3s1plus in your example

it doesn't look like it... just in the root directory.
Screenshot 2023-03-14 at 11 32 58 AM

@paukstelis
Copy link
Owner

The problem is that the config.yaml file is owned be root. It is not clear why that happened, as the script just copies everything from .octoprint (which doesn't have those permissions).

@grantcoultrup
Copy link
Author

The problem is that the config.yaml file is owned be root. It is not clear why that happened, as the script just copies everything from .octoprint (which doesn't have those permissions).

got it... I'm not 100% proficient so this may be a dumb question... can I duplicate the .yaml file and then copy it to the instance directory? If so could you share some direct for that process?

@paukstelis
Copy link
Owner

Doing a little searching it seems that there is a sed command in the script that can lead to random permission changes on some systems. It is not something I have observed before. I think there is fairly simple fix. I will implement in a new branch and have you test that out. Will get back shortly.

@paukstelis
Copy link
Owner

Do the following:
git -C octoprint_deploy pull
git -C octoprint_deploy checkout permission
run script: sudo octoprint_deploy/octoprint_deploy.sh
delete the instance, then remake it

@grantcoultrup
Copy link
Author

Hm, still having issue... see image
Screenshot 2023-03-14 at 12 22 06 PM

@paukstelis
Copy link
Owner

paukstelis commented Mar 14, 2023 via email

@grantcoultrup
Copy link
Author

A different issue, however. sudo systemctl status instancename

Still only seeing config.
Screenshot 2023-03-14 at 12 43 13 PM
yaml file in the root directory

@paukstelis
Copy link
Owner

Sorry, ended up in a meeting. You need to give your instance name: sudo sytemctl status e3s1plus

@paukstelis
Copy link
Owner

see what error you get from the status command.
Then try changing file ownership and restarting the instance:
sudo chown ampelOctopi1 ~/.e3s1plus/config.yaml; sudo chgrp ampelOctopi1 ~/.e3s1plus/config.yaml
sudo systemctl restart e3s1plus

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

No branches or pull requests

2 participants