Jump to content
Stephane Sala

File Transfer from Windows - Nothing makes sense anymore !

11 posts in this topic Last Reply

Recommended Posts

Hi Guys

 

Running UNRAID 6.7.2

 

Have a few shares, all full of media, all PLEX libraries. 

Got the PLEX docker to work, everything OK there. 

 

I am losing my mind figuring out what's wrong with windows/linux permissions and file transfers. 

 

I have multiple shares: Movies, Tv Shows, UFC, For Shame (reality TV for the wife) ...

They are all public and are all configured exactly the same. 

 

The first share I created in Unraid was the "movies" share. 

I figured out that for me to have access to it, I needed to create a user in UNRAID with the same name and password as my windows user. Done and working. 

 

Now all the other shares after that one, I can see and access from windows but I don't have write access ! I can't delete or create files there. 

During my troubleshooting for the this issue, I once deleted that user in UNRAID, and instantly lost access to my shares in windows. Couldn't even see them, so I recreated the user, and I was back at the same place. Full read/write access to the "movies" share. Only read for all the other shares. 

 

I need write access to the other shares so I can transfer new episodes/shows when I get them !

 

I have read multiple posts and tried lots of things but right now I'm at a loss. 

 

Anything you guys can see ? 

 

Thanks in advance for your help. 

 

tower-diagnostics-20190806-2356.zip

Share this post


Link to post

This sounds suspiciously like another problem that I helped out recently.  Read through this thread and do the Linux command line stuff to see what results you are getting.  Be sure to post up the output of those lines.  

 

https://forums.unraid.net/topic/82188-file-permissions-issue-with-plex-docker-linuxserverio/

 

The problem is that the Docker app is setting the wrong permissions down at the Linux level.  Thus the SMB layer can't write to the Linux file system. 

Share this post


Link to post

Ran the first cmds, results attached. 

 

For the third one, I chose a random one, since they all behave the same. 

 

Chose the TV Shows Share. Not sure what it means but some of them are in a different color as you can see. 

 

So reading from the post you linked, I guess it means that my docker wrongly assigns permissions on those shares to "nobody" who is actually ... nobody ! 

I don't see any difference with the "Movies" share though but now that I think about it, I created that share while running another Plex Docker, which turned out to not work properly so I then got a different one. Which could explain why that share works ! 

 

BTW using Plex Docker: plexinc/pms-docker

 

 

 

 

1st cmd.JPG

2nd cmd.JPG

3rd cmd.JPG

Share this post


Link to post
Posted (edited)

Notice the absence of the w's for the Owner and Other in the permissions in these entries:

 

image.png.1041d03ff3c83136f46b2990d03f625f.png

 

And with these entries, the Owner is wrong!  It must be nobody 

image.png.86849fde728df73125cefd5581dc2f1f.png

 

Read this post again and then read the balance of the thread carefully as your problem is only a slight variation of the situation discussed 

 

You can temporarily fix this problem by running the Docker Safe New Permissions script (A part of the Fix Common Problems plugin and found on the Tools menu). 

Edited by Frank1940

Share this post


Link to post

I hesitate to offer this as a "solution", because I'm sure there are better ways, but what has helped me a lot with Linux permissions problems is WinSCP.

 

It's a bit like a Linux-oriented file explorer that you run on Windows (it's actually much more than that). As a Windows person I struggle sometimes with Linux permissions. The useful thing about WinSCP is that you get to see permissions and owners on files and folders in unRAID in a Windows GUI environment, and even better, you can change those permissions and owners very easily. This is perhaps the dangerous part, so please proceed with care.

Share this post


Link to post

Hi Guys

 

So with the Help of my Cyber Security Specialist at work, we found a very easy solution to this. He is a Linux veteran and was able to provide me with an easy fix. 

 

As we can see from the first command you had me run, we can see that the governing user for my shares is "nobody" from the group called "users". 

What we did is added my UNRAID user (remember, same as my windows user) to the group "users", using that command: 

 

usermod -a -G examplegroup exampleusername

 

where example group for me was "users" and exampleusername was my UNRAID/Windows usermame. 

 

And instantly, I got read/write access to all my shares from Windows. 

 

Hope that it can help people in the future !

 

Cheers

Share this post


Link to post

So after a bit more testing, the above only kinda worked. 

I was able to create folders in some of the shares but not others. Or in my TV Shows shares for example, I could create a folder for a new show but I couldn't create a folder in an existing show's folder ( to add a season for example ). 

 

I had to do some more research and found a definite solution: 

 

chmod -R 7 /mnt/user0

 

This set up a Read/Write/Execute permission on all my shares. Did some extensive testing and it's working perfectly ! 

 

Cheers ! 

Share this post


Link to post
Posted (edited)
1 hour ago, Stephane Sala said:

 

chmod -R 7 /mnt/user0

This is part of the operation of the Docker Safe New Perms script.  It also includes the code which will fix the Owner and Group names.   Most of us who are trying to help folks out like  try to avoid the use of the Linux command line to actually fix problems.  It is far too easy to really make a mess of things because Linux assumes that when you ask it to perform an operation, you know exactly what the result of that task will be.  Making a small syntax error can do an unbelievable amount of damage! 

Edited by Frank1940

Share this post


Link to post
7 hours ago, Stephane Sala said:

usermod -a -G examplegroup exampleusername

You shouldn't do this at the command line, and I'm not sure it would survive a reboot if done that way. Just create the user in the webUI. All users are in the same group, "users".

 

2 hours ago, Stephane Sala said:

chmod -R 7 /mnt/user0

This path explicitly does not include anything on cache. The more general path would be /mnt/user (no zero).

 

Probably best not to muck about with the command line until you get a better idea how things work. Unraid is linux, but you can't assume everything always works the way you might expect from other linux distros. For example, the entire OS is in RAM. Any changes you make to the usual linux OS folders and files will not survive a reboot. 

Share this post


Link to post

Hi trurl

 

User was created on the webUI, was only able to read not write. But after some testing, that first cmd didn't really workout. 

 

Regarding the second cmd: 

I have nothing on cache so it worked for me but good to know. I plan on changing that in the future so thanks for letting me know the more general path !

 

Overall all of this is starting to get me interested in Linux and UNRAID ! I can see myself probably moving away from Windows in some time ! Not before I spend countless hours reading/learning about it though ! 

 

Thanks again for your help guys

 

 

 

Share this post


Link to post

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.