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
  • 70,465
  • Is it a network share or the same PC? –  Oct 19 '18 at 21:09
  • To be honest, i have both which i want to mount.

    The three drives i have installed, i have not formatted and are old windows drives.

    from this article: https://help.ubuntu.com/community/MountingWindowsPartitions

    I dont think its possible.

    However, i also have a NAS MyBookLive, i'd like to mount, but i shall probally create a new question specifically for that.

    – Jonathan Crook Oct 19 '18 at 21:23
  • 1
    Assuming that Windows and Ubuntu are on the same computer, just create a NTFS partition on your hard disk, and both Windows and Ubuntu can access it. Do NOT install a Windows driver that claims to be able to read/write to ext2/3/4 partitions, as it WILL corrupt them. – heynnema Oct 19 '18 at 21:24
  • @heynnema i think you are correct, i need to format the drives. I am at the moment just playing and learning and not ready to format these drives. thank you. – Jonathan Crook Oct 19 '18 at 21:27
  • @JonathanCrook you don't need to completely format/wipe the drive. Just make some unallocated space and then create a NTFS partition there. – heynnema Oct 19 '18 at 21:30
  • 1
    Hi & Welcome. You can ask as many questions as you like. The key thing to remember here is that we like questions to be useful to future users i.e. some future person is likely to have the same trouble. This question you've asked is fine. If you have other queries that require a lot of back-and-forth discussion rather than having a clear solution, you might find the format of Ubuntu Forums more comfortable. – Zanna Oct 20 '18 at 18:01

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
  • 7,761
  • On the windows side, i get a Windows cannot access \server

    Check the spekking of the name, Otherwise there might be a problem with your network. To try and identify and resolve network problems, click Diagnose.

    – Jonathan Crook Oct 19 '18 at 21:42
  • Win10 can speak mDNS so just to make sure this isn't a name resolution problem access you Linux machine this way: \server-name.local It's the Linux host name with a .local attached to the end of it. Worst case access it by ip address: \192.168.0.101 or whatever. – Morbius1 Oct 19 '18 at 21:45