2

I installed Ubuntu 16.04 and I added a 2TB HDD to be shared over the network. My questions are: 1. Do I need to format the HDD as NFS (or other type?? - and how do I do that)? 2. How do I share the folders over the local network with Windows PCs? 3. How do I share the folders over the internet (another user)?

I initially formatted the HDD as ntfs, and added several shared folders but I cannot open the files from Windows. I tried formatting the HDD as NFS, but it does not work. I can create folders on the desktop and share, but I want to share the folders directly from the HDD.

Thanks

1
  • 1
    Welcome to AskUbuntu! I'm sorry, but phrases like "it does not work" are too vague to be very helpful in resolving your problems. Please help us help you by reviewing askubuntu.com/help/how-to-ask and then editing your post to provide clarity and focus. This related post may help you get started.
    – Elder Geek
    Commented Apr 14, 2017 at 14:35

1 Answer 1

5

Okay, your question asks several things so I will try and address them individually.

1. Do I need to format the HDD as NFS (or other type?? - and how do I do that)

No - you can format the hard drive (in Ubuntu) to anything you like. NTFS, FAT, exFAT, ext3/ext4 are all fine and will work when sharing files over the network, because the network "client" (your Ubuntu server being the network "server") will never see that filesystem. The file transfer/sharing protocol you choose will bridge the server and client filesystems; your Windows clients will never have to interact directly with the Ubuntu filesystem.

2. How do I share the folders over the local network with Windows PCs?

The easiest and most straightforward way to share files from Ubuntu over the network with Windows clients is to use samba. There is a great guide on the Ubuntu community wiki on how to create a samba network share, user and get started serving files. The only part that would differ, with your client being Windows and not Linux, would be #8 - you would type \\<your Ubuntu server IP>\<your share name> into Windows Explorer; this would connect to your samba share.

Samba is good with Windows clients because Windows support samba natively and doesn't require any extra software and minimal configuration on the client. However, given your third question, you may want to read on before setting off down the samba route..

3. How do I share the folders over the internet (another user)?

Sharing files over the internet can be done with samba, but it really isn't secure enough or designed for use over internet connections. Instead, consider something like Nextcloud to provide a safe, secure gateway to files on your home network. This too can be hosted on Ubuntu (guide here) and can, in theory, be used to share files with Windows clients too. It isn't as graceful nor as easy to setup on Windows as samba (Nextcloud has a client you download, install and link to your server) it is still very straightforward and easy to use.

2
  • 1
    Overall, this is a good answer; however, if the server computer is running only Ubuntu, I recommend using only native Linux filesystems, such as ext2/3/4fs or XFS, for local storage, including any directories shared via Samba. The main reason is that Linux's tools for managing non-native filesystems, and especially NTFS, aren't as good as Linux's tools for managing native filesystems, so when something needs repair, you'll be in a bind if you use NTFS. The client won't know the difference.
    – Rod Smith
    Commented Apr 14, 2017 at 17:38
  • Good points @Rod Smith - very valid. Unless you plan on swapping disks regularly with non-Linux hosts, native Linux filesystems are certainly preferable.
    – Foxie
    Commented Apr 14, 2017 at 18:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .