0

The Problem

I have Samba shared folders on Ubuntu Server 16.04 that runs in VirtualBox on a Windows 10 PC. It was working for the last couple of weeks but now I can't connect from the Windows PC. The server still runs, serves files with Apache2, has the same IP etc. How do I restore access to the shared folders?

Details

When I startup the VirtualBox Ubuntu instance I can still discover it on the network (using Windows Explorer), but the previously mapped drives no longer work, and I can't open the discovered Ubuntu instance. I get "Network Error - Windows cannot access \\{name of my Ubuntu instance} Check the spelling of the name..." etc.

I've also checked the samba logs (log.smbd) and everything looks fine there. I've tried restarting smbd too.

These are the settings I've previously added to the end of /etc/samba/smb.conf:

[UbuntuBenShare]
path = /home/ben
public = yes
guest ok = yes
writable = yes
force user = ben

[UbuntuWWWShare]
public = yes
guest ok = yes
writable = yes
force user = ben

I'd expect that when I double click on the discovered Ubuntu instance from Windows that two folders [UbuntuBenShare] and [UbuntuWWWShare] would show up - that's what happened when I originally mapped them.

I've also tried net use from cmd and get "There are no connections in the list"

Finally, I am able to ping the server from the Windows PC successfully.

It seems that the problem is not the network but something with the sharing or permissions. What can I do to connect to the shared folders from the PC?

0

Try reinstalling Virtual Guest Additions which are required in order to use Shared folders properly. This can be achieved by selecting Insert Guest Additions CD Image from the Devices menu of your guest VM window.

0

Turns out the firewall (ufw) was enabled while mucking about with SSL settings and that was blocking it. After disabling it, it worked again. I'll need to work out how to configure ufw to allow Samba to still work. @Ben

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.