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

Permission denied: '/tmp/mycroft/bus.pid' #17

Closed
goldyfruit opened this issue Jun 23, 2023 · 8 comments
Closed

Permission denied: '/tmp/mycroft/bus.pid' #17

goldyfruit opened this issue Jun 23, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@goldyfruit
Copy link
Member

Discussion from this Matrix thread.

2023-06-23 13:17:11 ovos_messagebus  | Traceback (most recent call last):
2023-06-23 13:17:11 ovos_messagebus  |   File "/home/ovos/.venv/bin/ovos-messagebus", line 8, in <module>
2023-06-23 13:17:11 ovos_messagebus  |     sys.exit(main())
2023-06-23 13:17:11 ovos_messagebus  |              ^^^^^^
2023-06-23 13:17:11 ovos_messagebus  |   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_messagebus/__main__.py", line 47, in main
2023-06-23 13:17:11 ovos_messagebus  |     PIDLock("bus")
2023-06-23 13:17:11 ovos_messagebus  |   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/process_utils.py", line 324, in __init__
2023-06-23 13:17:11 ovos_messagebus  |     self.create()
2023-06-23 13:17:11 ovos_messagebus  |   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/process_utils.py", line 377, in create
2023-06-23 13:17:11 ovos_messagebus  |     self.touch()
2023-06-23 13:17:11 ovos_messagebus  |   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_utils/process_utils.py", line 364, in touch
2023-06-23 13:17:11 ovos_messagebus  |     with open(self.path, 'w') as L:
2023-06-23 13:17:11 ovos_messagebus  |          ^^^^^^^^^^^^^^^^^^^^
2023-06-23 13:17:11 ovos_messagebus  | PermissionError: [Errno 13] Permission denied: '/tmp/mycroft/bus.pid'
1970-01-01 01:00:00 ovos_messagebus exited with code 1
tvh@debian:~/ovos$ ls -l /home/tvh/ovos
drwxr-xr-x 2 tvh tvh 4096 22 jun 10:49 config
drwxr-xr-x 2 tvh tvh 4096 22 jun 10:49 share
drwxr-xr-x 2 tvh tvh 4096 22 jun 10:49 tmp
tvh@debian:~/ovos$ stat /home/tvh/ovos

  Bestand: /home/tvh/ovos
  Grootte: 4096           Blokken: 8          IO-blok: 4096   map
 Apparaat: 259/2   Inode: 5505205      Koppelingen: 5
  Rechten: (0755/drwxr-xr-x)   UID: ( 1000/     tvh)   GID: ( 1000/     tvh)
  Toegang: 2023-06-23 12:09:03.415742823 +0200
Gewijzigd: 2023-06-22 10:49:21.793411529 +0200
Veranderd: 2023-06-23 11:58:49.783044519 +0200
 Ontstaan: 2023-06-22 10:49:21.793411529 +0200
tvh@debian:~/ovos$ id
UID=1000(tvh) GID=1000(tvh) groepen=1000(tvh),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),100(users),106(netdev),111(bluetooth),113(lpadmin),116(scanner),994(docker)
@goldyfruit goldyfruit added the bug Something isn't working label Jun 23, 2023
@goldyfruit goldyfruit self-assigned this Jun 23, 2023
@goldyfruit
Copy link
Member Author

In this specific case, the issue appears only with Docker Desktop (tested on Debian & Fedora) but not Docker Engine.

@goldyfruit
Copy link
Member Author

Docker Desktop is doing some magic to change the permissions, I guess because it's running inside a VM.

If I run chown -R ovos:ovos /tmp when startingthe container, the permission on my host for ~/ovos/tmp/ directory changed to something unknown UID on my system (which is related to the VM created by Docker Desktop).

Before running the container.

ls -l ~/ovos/tmp/ -d 
drwxr-xr-x. 1 goldyfruit goldyfruit 0 Jun 23 10:11 /home/goldyfruit/ovos/tmp/

After running the container.

ls -l ~/ovos/tmp/ -d
drwxr-xr-x. 1 100999 100999 14 Jun 23 10:12 /home/goldyfruit/ovos/tmp/

@goldyfruit
Copy link
Member Author

goldyfruit commented Jun 23, 2023

Aside the Docker Desktop permission issue, the root cause is related to the fact that Open Voice OS is using a /tmp directory to share information across the different services.

The only remaining pieces which require a shared /tmp are related to ipc. I think I saw some PR about that maybe @JarbasAl will have more information about that.

In the meantime, I sent a PR to fix the PID, this will fix the current issue with the messagebus.

@goldyfruit
Copy link
Member Author

goldyfruit commented Jun 23, 2023

@timonvanhasselt Adding you to the conversation/monologue 👍

@goldyfruit
Copy link
Member Author

goldyfruit commented Jun 24, 2023

In the meantime, I sent a PR to fix the PID, this will fix the current issue with the messagebus.

PR has been merged and new images have been build. You should not get this error anymore but might get different ones.

@goldyfruit
Copy link
Member Author

This is the PR about the IPC OpenVoiceOS/OVOS-workshop#102

@goldyfruit
Copy link
Member Author

image

@goldyfruit
Copy link
Member Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant