Thanks a lot for this.Have a read of my guide to Building A Pi Based NAS. What you want if fairly easy to do.
Some assumptions:In brief (coz it's in my guide in depth):
- You're running RPiOS
- You're using pi as your username.
- You're using foo as a shared username for others and you have already created the Linux user. You may want to take steps to disable Linux logins for this user.
- You'll be mounting the drive on /srv/8tb
Anyone who logs in as foo will see both shares but will be denied access to private by smbd. Any attempt to access that directory via a login to your Pi will also be denied due to permissions set above. UNless they have root/sudo rights when logged in but if they do, all bets are off.
- Format the drive to ext4 or another Linux native filesystem. This will not work with NTFS, any other MS filesystem, and most no-native ones either.
- Get your drive mounting somewhere under /srv during boot (Using fstab A Beginner's Guide may help)
- Create two directories on your drive: /srv/8tb/public and /srv/8tb/private
- Set permissions on /srv/8tb/public to 777
- Set permissions on /srv/8tb/private to 700 and change its owner and group to pi
- Install Samba
- Configure it:
- Disable guest access
- Create two shares: public and private pointing at the relevant directories
- Restrict valid users for private to pi
- Create your Samba users.
- Hand out foo's cerdentials to whoever needs them. Keep yours private.
I did start the "long read" and am already impressed by how professional you document.
Before I go in depth tho: will this adress backing up / mirroring the content on my NAS to my SSD on the PC?
Statistics: Posted by silverhammer — Wed Feb 28, 2024 9:21 pm