How to create a directory under Linux that behaves like a pipe

We want to create a relatively simple document repository, but there are some requirements. My idea was that the file is scanned and processed by a separate tool / daemon when it immediately comes to the repository.

(Pseudo) DMS must provide access through NFS and Samba. As I have seen so far, pipes would be good for transferring the incoming file to some interceptors. But I was wondering if there is a way to create a directory as a channel. I saw only named pipes.

The process that should accept any input file in this directory is a PHP script that should do something like guessing like MIME, check CRC32 (against the value in the database) ... Someone tell me how to do this?

EDIT: I hope this will be a little clearer with the following explanation: I am looking for a way to provide an “endpoint” through Samba and NFS, where files can be placed that are processed by the virus scan and meta-process immediately (and finally saved).

+5
source share
3 answers

You can use FUSE to implement a Linux intermediate file system that sits on top of your real file system (backend file system) and which performs any check you need in the data before finally writing it to the backend. Then you serve this file system through NFS / Samba.

- API inotify, . , , , .

update: ClamFS !

+9

, , , . , , .. .

​​ . . , , PHP Script . , PHP .

Salva, - ; . PHP , , .

, : . , posix Windows. , Samba NFS , .

PHP, . , WebDav Samba NFS. . . webdav, .

, PHP, php , sabredav. Google .

, . -, nginx Apache, PHP , .

, , , .

UPDATE: , , Samba NFS; PHP. .

NFS/Samba . , , , , . , /. . , . , . nas4free , , syslog.

+3

Do you really need it to be SMB or NFS? I'm losing weight, you are probably better off writing / using some kind of custom server code. SMB and NFS were designed to transfer regular files, quite remote from your use.

+2
source

All Articles