Design: Fitting variable hierarchy of text files into a relational db
You could store the text file data in a table like this:


config_files
------------
  ID (PK)
  name
  parent_dir_id (FK to config_dirs.id) 
  content

config_dirs
-----------
  ID (PK)
  name
  original_user (key to the table that stores the original user data)
  parent_dir_id (key to config_dirs.ID, needs to be nullable to indicate a root directory)



Populating this structure, you could do something like this:


config_dirs
-----------
ID    | name       | parent_dir_id | original_user
------+------------+---------------+--------------
1     | conf       | (null)        | Toby Derius
2     | users      | 1             | Toby Derius
3     | admin      | 2             | Toby Derius
4     | bob        | 2             | Toby Derius

config_files
------------
ID    | name       | parent_dir_id   | content
------+------------+-----------------+--------
1     |general.cfg | 1               | This is the general config...
2     |admin.cfg   | 3               | admin's config...



This could allow you to query the directory structure and the file contents for specific users. Storing large amounts of plain text is not always a great idea, in terms of performance, so you might also want to consider storing the contents in a separate table file_contents and then referencing the file_contents from config_files. Also look into fill-text search engines.