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

Linux: permission issues on host mounted files #17

Open
Snider opened this issue Mar 15, 2024 · 6 comments
Open

Linux: permission issues on host mounted files #17

Snider opened this issue Mar 15, 2024 · 6 comments
Assignees

Comments

@Snider
Copy link

Snider commented Mar 15, 2024

image

@Snider
Copy link
Author

Snider commented Mar 15, 2024

image

@limosek
Copy link
Collaborator

limosek commented Mar 16, 2024

This is primarily a docker issue. There should be automatic permission setter within entrypoint.sh:

set-perms)
sudo mkdir -p "$WLS_TMP_DIR" "$WLC_TMP_DIR" "$WLC_CFG_DIR" "$WLC_VAR_DIR" "$WLS_VAR_DIR"
sudo chown -R lvpn:lvpn /home/lvpn
;;

which is called as a first command when running node. Not sure how it happened in your case that it does not work.
On host OS, files should have uid 1000 and gid 1000.

Can you issue ls -la on host os ?

@Snider
Copy link
Author

Snider commented Mar 16, 2024

I remember a perm issue very early on, I'll try to capture it.

Here are my perms:

snider@snider-MS-7E26:~$ ls -lah ~/lvpn
total 1.6M
drwxrwxr-x  7 100999 100999 4.0K Mar 15 15:37 .
drwxr-x--- 51 snider snider 4.0K Mar 15 15:20 ..
drwxr-x--x  3 100999 100999 4.0K Mar 15 16:10 blockchain
drwxr-xr-x  4 100999 100999 4.0K Mar 15 15:21 client
-rw-r--r--  1 100999 100999 1.2M Mar 15 18:07 client.log
-rw-r--r--  1 100999 100999 6.4K Mar 15 15:41 client-wallet.log
drwx------  3 100999 100999 4.0K Mar 15 15:37 .config
-rw-r--r--  1 100999 100999  73K Mar 15 17:34 daemon.log
drwxr-xr-x  6 100999 100999 4.0K Mar 15 15:22 easy
-rw-------  1 100999 100999 8.0K Mar 15 15:41 lethean-wallet-cli.log
-rw-------  1 100999 100999  720 Mar 15 15:41 lethean-wallet-rpc.log
drwxr-xr-x  4 100999 100999 4.0K Mar 15 15:21 server
-rw-r--r--  1 100999 100999 226K Mar 15 18:07 server.log
-rw-r--r--  1 100999 100999 1.4K Mar 15 15:41 server-wallet.log

@limosek
Copy link
Collaborator

limosek commented Mar 17, 2024

That is bad. Not sure why set-perms did not work. Can you issue this command on host?

chown -R 1000:1000 ~/lvpn

@bodane
Copy link

bodane commented Mar 20, 2024

Looks like only Linux related for now.
Windows host mount I don't see those errors and permissions I saw were below on the host.
Used git bash on windows.

client

darbs@DESKTOP-UOBNG6J MINGW64 ~/lvpn
$ ls -lha
total 18K
drwxr-xr-x 1 darbs 197121   0 Mar 20 23:35 ./
drwxr-xr-x 1 darbs 197121   0 Mar 20 23:35 ../
drwxr-xr-x 1 darbs 197121   0 Mar 20 23:35 client/
-rw-r--r-- 1 darbs 197121 360 Mar 20 23:35 lethean-wallet-cli.log
-rw-r--r-- 1 darbs 197121 360 Mar 20 23:35 lethean-wallet-rpc.log
drwxr-xr-x 1 darbs 197121   0 Mar 20 23:35 server/

node

darbs@DESKTOP-UOBNG6J MINGW64 ~/lvpn
$ ls -lha
total 58K
drwxr-xr-x 1 darbs 197121    0 Mar 20 23:58 ./
drwxr-xr-x 1 darbs 197121    0 Mar 20 23:35 ../
drwxr-xr-x 1 darbs 197121    0 Mar 20 23:58 blockchain/
drwxr-xr-x 1 darbs 197121    0 Mar 20 23:58 client/
-rw-r--r-- 1 darbs 197121  26K Mar 20 23:59 client.log
-rw-r--r-- 1 darbs 197121 2.9K Mar 20 23:58 daemon.log
-rw-r--r-- 1 darbs 197121  360 Mar 20 23:58 lethean-wallet-cli.log
-rw-r--r-- 1 darbs 197121  360 Mar 20 23:58 lethean-wallet-rpc.log
drwxr-xr-x 1 darbs 197121    0 Mar 20 23:58 server/
drwxr-xr-x 1 darbs 197121    0 Mar 20 23:50 share/

@bodane
Copy link

bodane commented Mar 20, 2024

That is bad. Not sure why set-perms did not work. Can you issue this command on host?

chown -R 1000:1000 ~/lvpn

A good workaround I think, if either creating the folder beforehand (if doesn't already exist) and setting these permissions on the host then launching the container. Also seems to work fine if just setting the permissions on the host side even if the container is still running, then restarting the container. Needs more testing to completely validate it all works.

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

3 participants