encrypt a directory

Martin Golding martin at adpplz.UUCP
Sat Jun 8 02:57:26 AEST 1991


>>>>>> On 3 Jun 91 18:12:39 GMT, sullivan at csn.org (Steve Sullivan) said:

>Steve> Is there a way to encrypt a directory, so that it
>Steve> and all files & dirs below it are completely 
>Steve> inaccessable to anyone?  This would be much preferred
>Steve> to encrypting all files in a large tree.

In <1991Jun4.161017.2561 at cbfsb.att.com> Dan_Jacobson at ATT.COM writes:
>Maybe encrypt a tar(1) or cpio(1) archive of the directory.

?? If you mean to encrypt the directory and all the stuff under it, isn`t
that "encrypting all the files in a large tree"? It shouldn't be any faster
to encrypt, and much slower to reload and decrypt when the data is needed.

The answer to the original question is no, absolutely not. The fact that
the directory names are encrypted doesn't prohibit people from reading
the files (if you converted "source" to "asdkjfhjjii", somebody does an
ls and gets asdkjfhjjii, and then does cat asdkjfhjjii). If you can't
protect the files sufficiently with the unix protections, you can't
protect the directory as a pathway. 

That said, I have seen 1) making a directory execute only (you can open
a file _only_ if you know the name) and 2) naming the subdirectories 
very strange names, and changing them occasionally. In the example
above, the "ls" wouldn't work (no read priveleges) and the wierd name
would be unknown to all but the select few, or to specified programs.
The purpose is to allow access to the lower data only to certain
(in this case database) programs.

This method only works to _allow_ access to the data. If you are
trying to _prevent_ access, and you are not confident of the unix
protections, nothing but encrypting the data will help.


Martin Golding    | sync, sync, sync, sank ... sunk:
Dod #0236         |  He who steals my code steals trash.
A poor old decrepit Pick programmer. Sympathize at:
{mcspdx,pdxgate}!adpplz!martin or martin at adpplz.uucp



More information about the Comp.unix.questions mailing list