Ubuntu – Share Ext4 Partition Over Network

ext4sambashared-folders

I have an Ext4 partition (not auto-mounted) that I would like to share (entirely) in my home that contains Mac OSX, Windows and Linux machines (currently the most important is sharing with the Mac). How may I do this?

Best Answer

Essentially, you will want to create a Samba share for the Ext4 mount point. Open-up your /etc/samba/smb.conf (in your favorite editor) and alter a few things:

1 - workgroup - you'll want to set that to the name of your network workgroup, if you have one.

2 - security = user - even if this line is commented-out, user-level security is the default for Samba.

3 - Define your Samba share at the bottom of the file. You should see a (commented-out) example at the bottom. You'll need the mount point of your ext4 partition (that you want to share). If you're not sure of what that is, do a "df -k" from terminal, and you should see it (put it in the "path" setting instead of "/some/directory").

[ShareName]
path = /some/directory
browsable = yes
valid users = myUser, user2, user3

4 - Next, you'll need to alter the permissions on the path (mount point) to ensure that the desired users can accomplish what they need to.

5 - Restart Samba

sudo restart smbd
sudo restart nmbd

6 - Connect to your Samba share from your Mac. I found instructions on that here. Essentially, it says:

When you go to the Connect to Server dialog, you may browse the names of computers that are on your local subnet.

You can connect to a server via its IP address or DNS name. If it is required or more convenient in your environment, you may also use other valid URL formats, such as:

smb://ServerName/ShareName

For me, I connect to my Samba shares by IP:

smb://192.168.0.117/ShareName

For troubleshooting, check the doc that I referenced: Mac OS X: How to connect to Windows File Sharing (SMB)

Hope this helps.