In another post I wrote how it would be nice to have a secure samba share. I had a quick play tonight to quickly see what was possible without too much effort.
I will write up the steps later, however, I want to summarize quickly what I done, along with the issues I encountered.
To do this I created a new linux group, user, and gave that user a password. At this stage SSH access was also possible with this new user, and they had their own home directory.
Then I initially wanted to create a folder in the /media directory, which already has AFPSDcard and sb1 directories. So I created a directory sb2 within /media, and I gave it rwx permissions for all users.
Then within /shares, I created a symbolic link Private pointing to /media/sb2.
Then I edited the /etc/samba/smb.conf file to include a new Private section, based on the Public section, with appropriate changes such as permitted users (the new user I created), and point to /media/sdb2.
I then also created a samba password for the new user.
Everything in theory should have worked. However, when I rebooted, I couldn’t map to the new share. Then when I looked inside the /media directory, the sdb2 directory was removed, and the Private symoblic link in /shares broken. It seems that the WD MPW deletes anything other than AFPSDcard and sdb1.
So instead, I then created a Private directory in /home/user_i_created, made this directory rwx and updated the Private symbolic link in /shares, and smb.conf file to point to /home/user_i_created/Private. Now everything works fine because the /home/user_i_created/Private directory is not removed after a reboot.
Ideally, I want to set up a “private” share which will be visible when I plug the WD MPW into a computer. This is why I tried initially putting my “Private” share within the /media directory. I wonder what process/script is removing the other files from the /media directory – any ideas ?
Also, I notice in the root of the drive there is a directory called DataVolume. It’s not a symbolic link, however it has the same content of /media/sdb1.