2

I am trying to set up a share from Ubuntu to Windows 10. I have followed this tutorial here. I don’t understand why that tutorial says to create the "home" section in smb.conf because it doesn’t do anything.

anyway, right now i have this:

[A]
 comment = public anonymous access
 path = /media/crooklar/347A1DC37A1D8332/
 directory mode = 0777
 directory mask = 0771
 browsable =yes
 read only = no
 writable = yes
 guest ok = yes

347A1DC37A1D8332 is a separate drive on my machine, what i might refer to as a D drive. I have 3 of these, not in a RAID etc.

On the Windows side, I can see my machine, and I can see the share called a but I cannot access it.

What am I doing wrong or what do I need to do?

P.S How many questions can I ask without being annoying? I am trying to force myself to use Linux instead of defaulting to Windows And is there a discord I can just speak to someone on?

Zanna
  • 72,312

2 Answers2

1

At a guess, the Samba user may lack permission to that directory. As a test, try sharing a globally-readable directory (/usr, for instance) instead.

The general fix is to "map" the windows access to a good user. For instance, here is an example with a separate, dedicated user. Another option is to simply login with a Linux username and password: https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server

If I interpret your comments above right, you may also want to mount your old disks in /etc/fstab -- you can set the users and group there (other examples, all options), make them read/write by everyone, set nofail to allow booting without them, ...

Jacopo
  • 746
1

Change your share definition to this:

[A] 
comment = public anonymous access
path = /media/crooklar/347A1DC37A1D8332/
read only = no
guest ok = yes
force user = crooklar

Then restart smbd:

sudo service smbd restart

Reason: Linux creates the /media/$USER ( /media/crooklar in this case ) in such a way that only crooklar can traverse it to see what's beyond it. A guest user is not crooklar so regardless of the permissions on 347A1DC37A1D8332 the samba guest will never gain access.

force user = crooklar will force the guest user to look like crooklar ( at least for this share ) so he can pass and get to the 347A1DC37A1D8332 directory where its permissions take affect.

Morbius1
  • 8,437