In my home system, I have a second Hard Drive on each of my computers for common storage of projects and files.
I’d like to have this second drive accessible from all the other computers, with all permissions. It’s just a private home network, so I’m not worried about controlling who does what. I want it to be wide open.
Here’s what I do to set it up:
sudo fdisk -l
We’ll assume for the rest of the examples that the drive is /dev/sda2
sudo mkdir /media/storage
sudo gedit /etc/fstab
For an EXT4 formatted drive:
/dev/sda2 /media/storage ext4 rw,user,exec,noatime 0 0
For an NTFS formatted drive:
/dev/sda2 /media/storage ntfs users,defaults 0 0
These next three instructions only apply to EXT formatted drives. If your drive is NTFS format, you can skip them.
sudo chmod +w /media/storage
sudo chmod 777 /media/storage
sudo chmod -R 777 /media/storage/*
sudo chgrp -R users /media/storage
sudo gedit /etc/samba/smb.conf
Put in the following lines (substitute your user/group name, and your path):
[storage] path = /media/storage writeable = yes browseable = yes force user = frank force group = frank read only = no guest ok = yes create mask = 0777 directory mask = 0777