Skip to content

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

@mikeschinkel

Description

@mikeschinkel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions