views:

70

answers:

2

Hi!

We have a project (Web/PHP) where we would like users to access their files, used in our application, using some kind of standardized protocol e.g. FTP or WebDAV. This would make it easier for our users to access their files, which mainly consists of templates and images.

The thing is, the directory that the users would be browsing, has to be generated programmatically somehow. This is because of custom permissions in the application, dynamic files/directories, and physical files and folder mixed with different permissions (files that the user should have access to are mixed with ones they should not).

How would we best and most easily accomplish this? Generate file links and use FTP? Build a custom server application using Python/Java?

Please share any ideas! :)

A: 

I would try to use the standard Apache mod_dav_fs, and provide access control using the standard Limit directives. It's not clear from your description why it would need to be programmatically - you can certainly have different kinds of access control on different files in the same folder.

Martin v. Löwis
Thanks for your answer! I forget to mention that we need to mix physical files and virtual files, that is why this have to be done programmatically.
Znarkus
A: 

The answer to my own question seems to be sabredav. I will report how this goes..

Znarkus