A collection of computer systems and programming tips that you may find useful.
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Tuesday, November 13, 2018

Sharing a folder on a Synology NAS with MacOS and Ubuntu linux using CIFS / SMB

I have a Synology DS418 Network Attached Storage (NAS) system.

I wanted to create a Shared Folder on the NAS that I could access from Mac OS (Mojave 10.14) and a Linux box running Ubuntu 16.04.

MacOS uses SMB to share folders and so I decided to use that on the Linux box.

There are 3 parts to this process:

#1 Set up the folder on the NAS.

In Synology File Station, create the folder (SMBtest is the name used here). Under the Permissions Tab I gave my user (jones) full control by selecting 'Administration' and 'Change Permissions' and 'Take Ownership'

I think that is all that is needed on the NAS.

#2 on the Mac

Under the Finder -> 'Go' -> 'Connect to Server'
In my case the address to use was 'smb://craic-nas-1'
Connect as Registered User on the NAS and then select the volume 'SMBtest'

I then had access to that volume in the Finder or at /Volumes/SMBtest on the command line

#3 on the Linux box

Ubuntu Linux uses the CIFS "common internet file system" protocol to communicate with SMB servers.

I had to install the CIFS software

sudo apt-get install cifs-utils

and I created a credentials file with my NAS username and password.

emacs ~/.smbcredentials


chmod 600 ~/.smbcredentials

I created a mount point on the Linux box and made myself the owner

mkdir /mnt/
mkdir /mnt/jones
sudo chown jones.jones /mnt/jones

To mount that shared folder

sudo mount -t cifs -o credentials=~/.smbcredentials,uid=1000,gid=1000,iocharset=utf8 //craic-nas-1/SMBtest /mnt/jones/SMBtest

My UID on the linux box is 1000 - the uid and gid options means that the mounted directory is owned by me on the linux box - otherwise there are all sorts of permission issues.

The iocharset=utf8 is important. Without it, if I edited a file on Linux then there would be strange characters when I looked at it on the Mac side.

With that mount command I can create, edit and run scripts on either MacOS or Linux

To unmount the share

sudo umount /mnt/jones/SMBtest

To mount the share automatically I added this to /etc/fstab

//craic-nas-1/SMBtest /mnt/jones/SMBtest cifs credentials=/home/jones/.smbcredentials,uid=1000,iocharset=utf8 0 0

To test that works

sudo mount -a


Blog27999 said...

According to Stanford Medical, It is in fact the one and ONLY reason women in this country live 10 years longer and weigh on average 42 lbs lighter than us.

(Just so you know, it has absolutely NOTHING to do with genetics or some secret exercise and really, EVERYTHING around "how" they eat.)

BTW, I said "HOW", not "what"...

Click on this link to see if this easy quiz can help you decipher your true weight loss possibility

jenny said...

Togel Online

Bandar Togel Terpercaya

Judi Togel

Agen Togel

Daftar Togel

Keluaran Togel

Sonam Sharma said...

Delhi Escorts Offer The Safest Escort Services To Clients
Make Your Evening Special And Romantic With Hot Delhi Escorts In Budget And Get 100% Physical Satisfaction. People Who Have Not Made Any Physical Relationship Yet Have A Golden Opportunity To Open Up And Become Extroverted Now. Booking Open Now Pick Up Your Phone Text Us.
Delhi Escorts
Delhi Escorts

Bed Pari Bangalore Escorts said...

Thanks for sharing this brilliant article it was a very useful and helpful article.

Bangalore Escorts
Bangalore escorts service
Bangalore escorts
Bangalore Escorts
VIP Escorts Bangalore
Call Girls in Bangalore

Divya Goal said...

Escorts near sterlings mac hotel bangalore
Escorts service near the chancery pavilion Bangalore
Independent Bangalore Escorts
Bangalore Escorts Services
Hifi Escorts
housewife escort

VIP Delhi Escorts Girls said...

Book our services by calling @ 9871368411 to get dazzling Escorts in Delhi to satisfy all your sexual necessities or visit links beneath. Our Delhi Escorts will give you a pleasurable time that you've never envisioned even with various Escorts in Delhi.
Saket Escorts
Mukherjee Nagar Escorts
Paharganj Escorts
Vikaspuri Escorts
Vasant Vihar Escorts
Nehru Place Escorts
Cheap Delhi Escorts Service
High Profile Escorts in Nehru Place
Celebrity Escorts in Mukherjee Nagar

Archive of Tips