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

Can't see shares from Windows 10 #264

Closed
bonny1992 opened this issue Dec 16, 2019 · 8 comments
Closed

Can't see shares from Windows 10 #264

bonny1992 opened this issue Dec 16, 2019 · 8 comments
Assignees

Comments

@bonny1992
Copy link

bonny1992 commented Dec 16, 2019

Here's my command:

docker run --name samba -it -d \
	-p 139:139 -p 445:445 \
	-p 137:137/udp -p 138:138/udp \
	-e USERID=1000 -e GROUPID=1000 \
	-v /media/elements:/mount \
	-v /home/rock64/docker/samba/add.conf:/add.conf \
	--restart unless-stopped \
dperson/samba:aarch64 \
	-p -n \
	-s "public;/mount;yes;no;yes" \
	-w "WORKGROUP" \
	-I "/add.conf"

and this way I cannot access any share on my Windows 10 PC unless I docker exec -it samba /bin/sh and I type smbd in the new console.

Any help?

@Shenanigans77
Copy link

I'm having a similar issue.

@dperson dperson self-assigned this Mar 20, 2020
@LeoRX
Copy link

LeoRX commented Mar 22, 2020

From memory its Windows 10 disabled annoymous share by default. have a look here.

https://support.microsoft.com/en-au/help/4046019/guest-access-in-smb2-disabled-by-default-in-windows-10-and-windows-ser

@neben
Copy link

neben commented Mar 24, 2020

I had the same issue. Turns out this was just the -p option setting the permissions on my share. This can take a long time, as it's recursively changing ownership on every file in the share, and this happens when the docker container is started. The smbd daemon is started only after this finishes. You can check if this is the case by inspecting the tasks running in the container; if it includes something like chown -Rh smbuser /mount then this is the issue.

If your share has the correct permissions, just remove the -p option. Otherwise, you'll either have to set them manually or keep using the -p option and wait until it finishes each time you restart the container.

@dperson
Copy link
Owner

dperson commented Mar 25, 2020

@bonny1992 what is in the docker logs samba? It shouldn't really like having you run smbd again, and I can't picture how that helps things. It could just be a delay in setting the permissions as @neben mentioned. I can have that run in the background and let samba start up...

@dperson dperson closed this as completed Mar 25, 2020
dperson pushed a commit that referenced this issue Mar 25, 2020
@bonny1992
Copy link
Author

bonny1992 commented Mar 25, 2020

Sincerely I don't know why running it again make it works normally.

The only things that appears in the logs are those two lines:

Global parameter disable netbios found in service section!
usermod: no changes

The first one is a fix I tried for not seeing the shares on W10, the second I don't know.

But yeah, now that I know that I just have to wait or remove the -p option I won't start smbd again. (I feel that now it's faster because it already changed all the permissions it needed).

@neben
Copy link

neben commented Mar 25, 2020

Sincerely I don't know why running it again make it works normally.

In reality that's most likely because it hadn't been started in the first place (because the startup script was still changing permissions and hadn't reached the point where it starts smbd). So you starting it manually was in reality the first time the daemon was started (in the lifespan of that container).

@bonny1992
Copy link
Author

Thank you for your explaination @neben but shouldn't it throw some kind of errors during the file handling?

@neben
Copy link

neben commented Mar 25, 2020

shouldn't it throw some kind of errors during the file handling?

Not if there are none, I guess. In my case it was just a big old drive with lots of files on a weak Raspberry Pi — chowning that can take some time, probably even worse if it's an NTFS drive.

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

5 participants