July 17, 20241 yr I have created a user for my scanner at home so I can scan documents and upload these to a share. But now whenever I create a new docker container or upload new files to share this user "scanner" is attached to the files and/or folders. This is causing issues in me not able to edit files or a docker container not able to create or edit files. The user scanner has the ID: UID 1000(scanner), GID 100 (users), Groups=100 (users) How can I solve this?
July 18, 20241 yr Community Expert Read this: https://forums.unraid.net/topic/131730-update-from-69-to-6115-and-got-permission-denied/#comment-1219731 and the tool "New Permissions" (under the TOOLS tab) will fix the problems for files already in the server. If that doesn't work, use this command and drill down the file tree until you get to the Share where the problem starts. ls -al /mnt/user And post up a screenshot of the output. (Note you have to replace spaces in directory names with a "\ " (Backslash followed by a space, ignoring the quotes of course...) Also tell how you are accessing the share to write to it-- via SMB, NFS or from a VM or Docker container. 20 hours ago, DutchTee86 said: I have created a user for my scanner at home so I can scan documents and upload these to a share. Where did you create this 'user'? Is this user a 'Shares Access' user, created under the USERS tab or did you do some sort of back door operation? (I seem to recall that scanners have presented problems (writing directly to a server) in the past because so few people actually do it that the manufacturer's software/firmware is often buggy in supporting this feature.) Edited July 18, 20241 yr by Frank1940
July 19, 20241 yr Author Well thanks for the reply! I created this user via the users option in Unraid so it can acces the shares. I've done ls -al /mnt/user and attached is a screenshot. Good to know, before I created the vikunja container (which created the folder vikunja) I have deleted the user scanner to see if that would solve the issue. Inside the docker container vikunja I've entered 2 variables; PUID = 99 PGID = 100
July 19, 20241 yr Community Expert On 7/17/2024 at 10:54 AM, DutchTee86 said: to share this user "scanner" is attached to the files and/or folders. This is causing issues in me not able to edit files or a docker container not able to create or edit files. The user scanner has the ID: UID 1000(scanner), GID 100 (users), Groups=100 (users) First thing, the share 'appdata' is not to be used to store data that is to be accessed by any regular Share user. It is only used to store those files which are used by the Container itself. You should have set a regular User Share to store those scans in. There should be a 'Host Path' variable set up in the Docker Container to use to store the scans in that share. Here is an example of what a Host Path setup looks like: I have used binhex-preclear Docker to show this as it the only container that I am using that has this type of mapping. Unfortunately, this docker has to have access to a file on the Unraid boot/Flash drive which is not typically done. More later about this... On the DOCKER tab, let-click on the icon for the Docker. Pick 'Edit' from the dropdowm menu. When I do this for preclear docker, I get this: I have marked a Host Path. Now let's look at the 'Container Path' (in orange). I open the Console for the Container and type the following command (and its output is shown): This output is from the Linux OS that is inside of the Docker. (Every Docker has a truncated OS running inside of it. A VM if you like..) Now let's look at the Host Path. It is on the Unraid Operating system. I will use the GUI Terminal to look at it: Look at both of the time and date on the disk.cfg file in each of these screenshots. They are identical. If one read, write. does and edit and save, or deletes that file from either the Docker or on Unraid, the action will be appear on the other. (In reality, it is only one file that is really on the boot drive!!) There is a pointer on the Docker container that points to this file on the boot drive. Here is what would happen if you setup a Host Path on Docker container from a file location (Container Path) inside of the docker to a User Share (Host Path) on your Unraid server. Whenever the scanner program saved a file in your Docker, it would be written to that User Share. Then you would access the scan from the User Share. (You would have to set the Share to be exported and setup security-- if required -- on that User Share.)
July 19, 20241 yr Author Hi Frank, Thank you for your detailed answer! Just to be clear; I am aware that the appdata share is only meant for the files created by a container. I have setup a share called userdata were all my personal data is stored. However when creating a container or upload a file through an app running in that containeit is created with the wrong user/group attached.
July 19, 20241 yr Community Expert From the link in my second post, you need this Again you would edit the Docker: While this docker (that I took this example from) does not require it, you should also add (or edit) the UMASK Container Variable and set it as indicated above. If you do that all files (and directories) written by that Docker will have the owner of 'nobody', group of 'users' amd the proper permissions for the User Share! (In my example, this Docker is mysql and a user program--- KODI ---running on a client adds and edits the mysql database. KODI has only access to the database through a open port on the Docker Container. The database does not need to be accessible as the files in it only have meaning to the mysql program. So they are stored in the appdata share.)
July 22, 20241 yr Author Ok, I figured out that I could attach a certain user to a docker container and I guess this will solve the problem. However as far as I can remember I did not had to do this before creating another user. But perhaps that is just the disadvantage of creating multiple users. Thanks!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.