Solution: Hiding Files from Prying eyes

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

  1. how to use vi <== text editor in linux

  2. how to ssh into the cloud and issuing a few commands

General

  1. so lets consolidate all your files into a directory that you want hidden. lets call this the xxx directory to keep it short.

  2. ssh into the cloud and change directory to your xxx directory. for this example the share name is bills

     cd /shares/bills  

  1. mv xxx .xxx   <=== xxx is now hidden as .xxx

Editing the Samba veto file 

  1. cd /etc/samba

  2. vi smb-global_veto.conf

  3. 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/

  1. restart samba by typing 

/etc/init.d/samba restart

Done. Now the directory .xxx will be hidden on both Mac and PC. 

Unhide

  1. ssh into the cloud

  2. cd /shares/bills

  3. mv .xxx xxx

Hide

  1. ssh into the cloud

  2. cd /shares/bills

  3. 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…

“hidden” files (beginning with a dot) are not displayed by default on Windows systems.   If you have it enabled in the Explorer preferences, they will show up (but will be greyed as if they were hidden.)

Samba controlls this with the 

hide dot files

 smb directive, which is enabled by default (and is enabled on the Cloud.)

Capture.PNG

If you want to COMPLETELY hide them so they’re not visible at all (regardless of Windows setting) then yep, veto is the way to go.

1 Like

Personally, I take a less technical but equally effective approach.

Name your directory/share “NoPr0nInThisFolder”. But the trick here is, you actually *do* put all of your nastiness in that folder! It’s called reverse psychology. It’s fringe type bleeding edge psychological manipulation, so you likely won’t hear about it for a few years yet. But just trust me. It makes them believe that there’s nothing bad in there because it specifically STATES nothing bad is in there. By default, deep in the soul, the subject takes it as truth and will not look in that folder for anything bad. That’s a hidden folder if I’ve seen one. The best hiding place is in plain sight. Never forget that.