Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wrong user attached to files and folders

Featured Replies

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?

 

  • 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 by Frank1940

  • 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

 

unraid.png

  • 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:

image.thumb.png.cedf1da548c681df15727faeb478f982.png

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):

image.png.1ed5fd7bd5c83e3cbdb88aead8fe604b.png

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:

image.png.d10a74e64695c5ced5cca1bde58b57e2.png

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.) 

 

image.png

  • 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. 

  • Community Expert

From the link in my second post, you need this

image.png.71cf78107113e3aa49ffd2a2117d5be9.png

 

Again you would edit the Docker:

image.thumb.png.c756a0b8490b85e3163948ef23555781.png

 

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.) 

 

  • 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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.