Score:0

How do I get folder sharing working between Ubuntu 20.04 server and my Windows PC's?

de flag

I have a Server in my closet running Ubuntu 20.04 on the boot drive and has a hardware Raid 1 array set up on 2 6TB HDD's. I want to be able to share the entire 6TB array to all my Windows PC's so I can browse it and keep my library of movies and TV shows on it.

(I had this working already when I had Windows on the server but I'm currently trying to get Steamcache working so I need Ubuntu, but that's a whole other nightmare.)

I have the raid array formatted in NTFS. I have already right clicked on the drive in Ubuntu and shared it, including checking the guest access box. However, when trying to access it by mapping it in Windows 10 and entering the login info for the server, I get an error saying I do not have permission.

How can I get this working properly? Thank you

jpbrain avatar
ca flag
Hi Deadboy90. Did you install samba? Did you install a desktop or a server version of ubuntu?
Deadboy90 avatar
de flag
I did install the "Sharing Service" when prompted by the OS after I set it to share, from what I understand that is Samba. And I'm running the desktop version of Ubuntu.
Score:0
us flag

Check this answer: https://askubuntu.com/a/391709/911198

In short, it's an oversight in Ubuntu's permission management that you have to manually fix. The directories for network shares have to be executable for others all the way down to the root, but checking the share with guest box in the UI doesn't ensure that.

Quoting the above answer:

check permissions on all the directories leading from / down to your shared folder too: if ["other users"] don't have execute permissions for a directory then they're prevented for accessing any paths below that point, including your share.

Let's say you wanted to share /mnt/external/ntfs-drive/folder. You could add the 'x' permissions on all the parent directories with this command:

sudo chmod o+x /mnt /mnt/external /mnt/external/ntfs-drive

You also need to set read, write and execute permissions for the shared folder and any contents, but for parent directories execute permission is enough.

For example, it won't work if any of the ancestor directories have permissions like drwxr-x--- (the default permissions on your home directory at /home/<username>/) -- they need to be at least drwxr-x--x. Using the gui to share a directory inside ~ with guest access does not fix this, you have to do it manually.

To see permissions, use ls -l <path-to-directory>. For more information on permissions, see https://en.wikipedia.org/wiki/File-system_permissions#Traditional_Unix_permissions

Thomas Aichinger avatar
cn flag
This is not a propriate answer to users question. You should give an example.
us flag
@ThomasAichinger what is the policy when the answer to another question is the answer to this question? How do I mark it as a dup?
Score:0
ca flag

Just with the install you should be able to see the server. The configuration for Samba is in /etc/samba/smb.conf.

Try changing the following line:

workgroup = YOURWORKGROUP

and add bellow that line:

client min protocol = NT1
server min protocol = NT1

Also you need to be sure that Windows stations are resolving the server name (meaning converting name to an IP address). You can also try accessing the IP with \\\ip\ (as in \\\192.168.1.x\) on your explorer's window.

Now, to have a local name resolution you can edit the C:\windows\system32\driver\etc\hosts file, on workstations and put name 192.168.1.x.

Good luck.

jpbrain avatar
ca flag
Pleae. Let me know if it is enough information so you can solve it or you need more detail. I tested it successfully on my home network.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.