I’ve been trying to wean myself away from the WD forums and this is probably my next to last post.; so lets see how well I’ve cured my addiction.
I’ve always wonder if there was a good way to hide files from just casual prying eyes.
With Linux this is fairly simply, just use a “.” before the directory name and the directory will be hidden; unless you type ls -all, which will list all the files including your hidden one. However issuing a general “ls” command and even when you map the shares to a Mac, you won’t see the hidden directory.
However when you map the share to a PC, the .hidden directory is immediately listed. To fix this, just use the samba veto file which you will find under /etc/samba/smb-global_veto.conf and restart samba.
To do the following solution, you will need to learn a bit of linux
-
how to use vi <== text editor in linux
-
how to ssh into the cloud and issuing a few commands
General
-
so lets consolidate all your files into a directory that you want hidden. lets call this the xxx directory to keep it short.
-
ssh into the cloud and change directory to your xxx directory. for this example the share name is bills
cd /shares/bills
- mv xxx .xxx <=== xxx is now hidden as .xxx
Editing the Samba veto file
-
cd /etc/samba
-
vi smb-global_veto.conf
-
add .xxx to the veto file by cursoring to your cursor to the end of twonky/ and hit i for insert and type /.xxx
hit escape
type :wq
veto files = /.nflc_data/.wdmc/.twonky/
to
veto files = /.nflc_data/.wdmc/.twonky/.xxx/
- restart samba by typing
/etc/init.d/samba restart
Done. Now the directory .xxx will be hidden on both Mac and PC.
Unhide
-
ssh into the cloud
-
cd /shares/bills
-
mv .xxx xxx
Hide
-
ssh into the cloud
-
cd /shares/bills
-
mv xxx .xxx
of course you can create a couple of scripts called
unhide.sh and hideme.sh and save them in /usr/bin so you can issue those commands whenever you SSH into the device.
So like always, click on the kudos “under” my name…