Skip to content

Invalid path '/root/.subuser': Permission denied #346

@lucasbasquerotto

Description

@lucasbasquerotto

Hi!

I use docker and like the idea of running applications in containers, and thought about creating a docker image to run on desktop (for example, connecting to the XServer), but Docker is more focused on the server side and some solutions like passing the socket to the container don't seem good from a security perspective.

Some days ago I saw about subuser and tried to install on my newly created virtual machine (it uses Linux Deepin 15.6).

I followed the steps (as in the docs):

# 1. Add yourself to the sudo group 
# (I was already in the sudo group so this was actually not needed.).
sudo usermod -a -G sudo $USER

# 2. Install python3-pip:
sudo apt-get install python3-pip

# 3. Install subuser
sudo pip3 install subuser

Then I added PATH=$HOME/.subuser/bin:$PATH to the end of my ~/.bashrc file, logged out and logged in.

When I tried to run subsuser, it asked me for a git user and email and I run the commands to add them (this was a newly created VM, as I stated above, so there was no git credentials).

Then the first command I run I received an error:

lucas@lucas-pc:~$ subuser list available
Traceback (most recent call last):
  File "/usr/local/bin/subuser", line 52, in <module>
    command(sys.argv[2:])
  File "/usr/local/lib/python3.5/dist-packages/subuserlib/builtInCommands/list.py", line 64, in runCommand
    reposToList = user.registry.repositories.keys()
  File "/usr/local/lib/python3.5/dist-packages/subuserlib/classes/user.py", line 70, in registry
    self.__registry.ensureGitRepoInitialized()
  File "/usr/local/lib/python3.5/dist-packages/subuserlib/classes/registry.py", line 62, in ensureGitRepoInitialized
    self.gitRepository.run(["init"])
  File "/usr/local/lib/python3.5/dist-packages/subuserlib/classes/gitRepository.py", line 70, in run
    raise GitException(stderr)
subuserlib.classes.gitRepository.GitException: fatal: Invalid path '/root/.subuser': Permission denied

lucas@lucas-pc:~$ 

It seems it tries to acess /root/.subuser but isn't able to.

From what I read in the docs, it should try to acess ~/.subuser instead. I tried to run subuser with sudo but received the same error.

I also uninstalled subuser and installed with pip3 without sudo in ~/.local/ but it couldn't even import the files (perhaps it has something to do with paths, but I don't know python very well). I couldn't even run subuser version (before, installing with sudo, it showed me 0.6.2 and other info, but most commands wouldn't work with the error above).

In any case, I followed the docs in every step and even tried to run in a brand new virtual machine but no success so far.

Any thoughts about what could be the problem?

I don't know if it's because it's in deepin, but it's linux anyway and docker works fine in it. It seems more like it is trying to use the wrong directory.

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