PDA

View Full Version : Anyway to password protect a directory on my duo guys?



Slammed Mind
09-03-13, 13:07
Hey guys, quick question

I have 2 solos and a duo in my house. the duo has a 2TB drive istalled and all 3 boxes are connected.

The recording path on my duo is /hdd/movie

I created a new directory called /hdd/movie/alan to keep my recordings seperate from my mums

My Pc HDD is starting to fill up so I plan to movie all movies on my Pc to my duo (/hdd/movie/alan)

The thing is I have some adult movies on my pc to so i wanted to ask is there any way to password protect the new directory I created it so my mum cant browse the movies in there?

Hope someone can help

Cheers

hedleyg
10-03-13, 19:07
Not so easy. Normally if you rename your directory from 'alan' to '.alan' the 'ls -l' command cannot see the directory.
Mediaplayer can still see it though!

Encrypting the directory is not an option either.

So the way forward is to make the directory invisible, by creating a new file and making a new file system on it ( a bit like a swap file).
Assuming you are logged on as 'root', ....
dd if=/dev/zero of=/hdd/movie/alan_fs bs=1M count=102400 #create an 100Gb file
losetup -f #find first free loopback device (usually '/dev/loop0')
losetup /dev/loop0 /hdd/movie/alan_fs #associate loopback device with your file
mkfs.ext3 -m 1 -v /dev/loop0 #create a ext3 file system
mkdir /media/alan; chmod 777 /media/alan #create mount point

Now mount the file system, ...
mount -t ext3 /dev/loop0 /media/alan

And the directory, '/media/alan', is ready for you to copy your movie files into it.

To unmount, it is a two pass process, ....
umount /media/alan
losetup -d /dev/loop0

Enjoy, but make sure you have everything backed up!

Slammed Mind
10-03-13, 21:17
thanks for your reply mate

Looks complicated :)

If i input he code you provided above will the new directory only be hidden from my duo and not my 2 solos (whi ch is what im trying to achieve)?

mickyblueys
10-03-13, 21:29
If you are so worried why don't you just hide it in a directory where you're mother would never go, and label it something like "system config"

Would've thought that would be enough to scare off any woman. :D

Sent from my GT-I9100 using Tapatalk 2

hedleyg
10-03-13, 22:32
The directory can only be seen, if it is mounted on the machine with the 'alan_fs' file. If it is umounted, nobody can see it - just like normal file systems

Cheers

cooa99
18-03-13, 14:40
probably safer to leave only those movies on your pc!,

you could end up loading a new image and then forget to hide the directory

marty
18-03-13, 16:40
Easiest solution would be to add a 2nd HDD to your PC or use an external HDD :thumbsup: