Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"Permission denied" at agent because sudo permissions required #503

Open
mikeschinkel opened this issue Aug 3, 2024 · 0 comments
Open

Comments

@mikeschinkel
Copy link

mikeschinkel commented Aug 3, 2024

tldr; I am summitting a PR to address this issue. It will run the agent using sudo when MUTAGEN_USE_SUDO=1 is set in the local machine's environment. This requires pre-configuring rights to access the agent via visudo on the machine running the agent to be able to access otherwise inaccessible files.

Note: This issue may or may not be related to #113.


I have a VMware ESXi server in a homelab running a Debian 11 VM at containers.local on which I run Portainer with lots of Docker containers. I added a container to run the Laravel-based Statamic CMS and then wanted to sync the source code from my macOS laptop running PhpStorm IDE to the volume used for the nginx root used by Statamic.

ChatGPT recommended lsyncd and Mutagen. I tried lsyncd and found it to be too buggy to run on macOS, and then tried Mutagen.

I learned Mutagen has providers for SSH and local Docker installs but does not have a provider for remote Docker installs. Given that, I tried using SSH and attempting to update /var/lib/docker/volumes/my_statamic_root/_data where my Statamic container's nginx volume is stored on the VM.

After getting everything else configured I ran into this error:

Last error: beta scan error: remote error: unable to open synchronization root: permission denied

Mutagen Sync List showing: Last error: beta scan error: remote error: unable to open synchronization root: permission denied

Given I am a professional Go developer I decided I would dive into the code and figure out what was needed to get it working for my use-case. That is the PR I will be submitting soon.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant