Linux mac network share

How to share files between Ubuntu and Mac OS X [closed]

Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you’re trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question.

4 Answers 4

Assuming you want to share on a local network

On OS X. Click on System Preferences —> Sharing. Make sure the Services tab is selected. Choose one of the sharing methods, either UNIX sharing or Windows sharing.

On your Ubuntu machine, go to Places —> Connect to server and enter the sharing details.

It’s not the smartest way to share files, but on Ubuntu you can simply use Share Folder option in the context menu, set settings as you wish and thats all. (Relogin may be required.) Then on MAC Ubuntu share should be discoverable.

I’m also using Ubuntu 10.04 and I can connect to my machines using their name. Say I have computers named ernie and bert that are on the same network:

ernie:~$ ping bert.local ernie:~$ echo hello > file.txt ernie:~$ scp file.txt bert.local:~/copied-from-ernie.txt 

You can use this in nautilus too. Enter ssh://bert.local into the nautilus location bar in ubuntu (hit Ctrl-L to select the location bar) and hit enter. If you have different user names use ssh://username@bert.local

I think you can do something similar in the Finder location bar.

You have to install/enable sshd for this to work:

  • Ubuntu: sudo apt-get install openssh-server (you may need to restart)
  • Mac: System Preferences —> Sharing. Check the «Remote Login» box.

Источник

Network file sharing between Linux and OS X

I want to share a drive/folder over the internet from my Debian machine back home, such that I can mount it on my Macbook when I am on the move. Basically I want to store my music at home and just access it over the network, instead of having two separate libraries, one on each computer. I will not go into why I would prefer a shared drive as opposed to a streaming application (that would be another question). What I want to know is, what do you think would be the best and/or easiest way to do this? NFS? Samba? Are there security risks involved, since I want to share over a public network as opposed to sharing over LAN, and if so, what are they? [Update] The answers indicated I should use sshfs, since it is easy to set up and uses an already established ssh connection. I have tried this, but I am having bad latency problems on file access. In other words, the transfer speed is ok, but applications have to wait until the file is fully downloaded to access it. This is very inconvenient behavior: if I try and play music off the mounted drive I will have about 20 seconds of pause before every song. Now, I have tested the same setup on a linux machine on the same network as the OS X machine. The latency problem is almost non-existent, that is I cannot distinguish it from regular throughput bottle necking. This makes me think it is an OS X specific issue. Which brings me back to my original question: what is a good way to mount a remote folder that’s on a linux server under an OS X client?

Читайте также:  Отключить dhcp linux ubuntu

Samba and NFS exposed to the internet both seem a bit unwise. A secure protocol is probably best if you’re hosting the files yourself.

You could potentially do nfs or samba sharing across an SSH tunnel, but sftp protocol is sufficiently integrated in most systems that it is probably easier than tunneling and then using a different protocol.

A lot of Linux/Mac filemanagers will often include an option to connect to an SSH server. I don’t even know the name of the filemanager that was installed with Linux Mint (Debian), but it includes the option very easy to access.

Источник

Sharing folder from Linux to Mac, Samba or NFS? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.

Which one is the recommended one for performance and security point of view?

Have you read: [NFS, AFP, SMB… Advantages and drawbacks on a Mac OS system][1] ? [AFP, SMB, NFS which is the best data transfer protocol?][2] [1]: apple.stackexchange.com/questions/19470/… [2]: superuser.com/questions/106418/…

5 Answers 5

NFS is very performant in closed network and it’s simpler than SMB to setup, SMB share has more configuration about access and permissions and it can be accessed by windows OS.

If you need a simple share that can be accessed only by known machines, I’d recommend NFS especially in LAN network has very good performance. SMB is more secure but it need more configuration ( nothing impossible ) and it can be accessed by almost all operating systems, it’s a must if u need to access it via WAN network.

In your case I suggest NFS but if you have in mind to expand his functionality in the future then go SMB.

Читайте также:  Linux режим работы сетевой карты

You can’t use soft links in Samba, you have a lot of broadcasts too. If you don’t have Windows systems, use NFS !

NFS is the recommended way to go. Five arguments, why NFS might be better in this situation:

  • Fast installation and setup
  • Simple/easy configuration of a «share»
  • Simplet configuratio of security settings, e.g. host-based security
  • Fast and reliable without the overhead of the SMB/CIFS protocol
  • AFAIK, MAC OS supports NFS better than SMB/CIFS.

Only know that NFS can be confused when you are exporting a folder which is a bind mount. Youse fsid=xxx in /etc/exports then.

One argument against NFS is that clients (users) have more control over file permissions since they are accessing the file share directly as a user on the server system. Samba allows user mappings for clients and shares as well as the ability to force umasks for files.

So, if you care about having nice and neat permissions for shares accessed by multiple users, Samba may be a little easier to use, once it’s setup. If you are the only one sharing, use whichever you find easier to setup.

  • easier to setup
  • better performance
  • security wise — it is better to be invisible for Windows machines. For example if you hook up an infected Windows machine to the network, if is Samba share, it will start infecting the share or in case of the latest middle east trojan- wiping out the shared drive
  • NFS has more features- like sym links, handles better network issues (it is client-server)

Linked

Hot Network Questions

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.14.43533

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Sharing files on a local network between Linux, Windows and Mac with Samba

Uqidoers often need to share files by the gigs. Of course, we never ever underestimate the bandwidth of a station wagon full of USB drives down the highway, yet on a local network we can do without them.

Prerequisites

To meet our needs, we first installed Ubuntu 16.04 LTS on our service machine: following best practices, we created three partitions on the disk. One for system files, another for home folders and finally a last one for data, mounted on /mnt/filesharing.

Samba installation

There are a lot a protocols available today, but Samba proves to be the most convenient to us, as it comes installed by default on both Windows and Mac. Installation is pretty straightforward on Linux, too.

Let’s type on our terminal

sudo apt-get update sudo apt-get install samba

to install the necessary packages.

Now, let’s make a backup copy of Samba configuration files into our home folder, so that we can roll back to the original settings in case anything goes wrong.

Читайте также:  Yandex disk linux запуск

We can now configure Samba to meet our needs:

sudo nano /etc/samba/smb.conf

First things first, let’s make sure the workgroup matches the one set on the rest of the machines we want to share files with: on Windows and Mac, by default, that’s WORKGROUP.

Ctrl W lets us find the row starting with

We’re now ready to add our share, based on what we want to share and how we want to share it: if necessary, we can create more than one folder and set a configuration for each of them.

Setting up shares

Option A: guest access

In case our server is connected to a safe network and we’re not sharing sensitive information, we can use it just like a USB drive to simply drop our files into, no password needed.

We can then create a folder named public in /mnt/filesharing, and append to the end of the file:

[PublicFileSharing] path=/mnt/filesharing/public comment=Public File Sharing guest ok = yes guest only = yes browsable = yes read only = no create mask = 0644 directory mask = 0755

These parameters describe, respectively: the folder to be shared, its public name, guest access permission, mandatory guest access (no access with a login), network broadcast of the share, writing permission, and finally default directory and file permissions for objects created by users.

Option B: login-protected access

When we deem our network to be unsafe or the information we’re sharing to be sensitive, it’s best to protect our folder with an access control system.

For our purposes then we can momentarily quit from nano and save smb.conf, in order to create a new user (or as many as needed) and allow them to access the files.

sudo adduser --nocreatehome --disabled-password --disabled-login mario sudo smbpasswd -a mario

We can now go back, edit smb.conf and append a configuration section for our newly created private directory in /mnt/filesharing.

[PrivateFileSharing] path=/mnt/filesharing/private comment=Private File Sharing guest ok = no browsable = yes read only = no create mask = 0644 directory mask = 0755 valid users = mario

Multiple users can be space-separated, just like this:

valid users = mario maria andrea

Test run

First let’s check everything was correctly typed: we can then close nano, save the file and finally restart Samba.

sudo service smbd restart

If everything is right (make sure you let spaces in between the parameter names, the = symbol and the arguments), we can now type into a Finder/File explorer:

and access our folder based on its configuration.

hostname is our server’s name: if you need to find it out, simply type on your terminal

P.S.: If you’re having problems accessing your share from Windows, you might need to add to your configuration this line

Happy sharing!

Источник

Оцените статью
Adblock
detector