# Virtual Filesystem from database?



## martinrame (Aug 18, 2022)

Hi, I need to expose data stored in a database (with links to real files), to be accessible from Windows PCs. I cannot simply copy those files to a "shared" directory, because there are thousands (many GB/day), I also cannot share them via samba, because the directory and file names are difficult to grasp by the user.

What I'm thinking, but I don't know if such _beast_ exists. is a solution that should allow displaying files and directories (generated from a PostgreSql database query) and when the user copies a file, a real file should be copied.

Does anyone know if something like that exists?


----------



## martinrame (Aug 19, 2022)

Well, an easy solution can be a web app allowing the user to find the files/directories needed, then selecting the needed items and executing an action (with a button click, for example) to copy them to a samba shared directory.


----------



## ralphbsz (Aug 19, 2022)

Look up IBM DataLinks. It allows storing files in a normal file system, but a database keeps control of the file (allowing for ACID properties and referential integrity), including file updates having transaction semantics. I think it requires installing AIX, DB2 and JFS. I don't know whether it is still sold as a product.


----------



## tingo (Aug 19, 2022)

Any web-based file manager with a database backend should work too.


----------



## Phishfry (Aug 20, 2022)

martinrame said:


> Well, an easy solution can be a web app allowing the user to find the files/directories needed, then selecting the needed items and executing an action (with a button click, for example) to copy them to a samba shared directory.


WebDAV module and lighttpd would be my choice. I dunno about the database component.






						Mod webdav - Lighttpd - lighty labs
					

Redmine




					redmine.lighttpd.net
				






			access webdav service from freebsd


----------



## martinrame (Aug 20, 2022)

Yes, it looks like WebDav is the way to go. But the problem here is I don't want to expose a filesystem (the files and directories aren't human readable, they are like: 1.2.3.344.312..2344/1212.33.456.234.5 for example). That's why I want to create something like an SMB or WebDav server where when clients invoke directory or file listing that data is generated by a database query, in human readable format, then, when a user tries to copy a file the real file is copied (maybe with a custom name).


----------



## martinrame (Aug 20, 2022)

I'll try this: https://sabre.io/dav/virtual-filesystems/


----------

