M
M
Meridian3122013-12-07 12:59:25
PHP
Meridian312, 2013-12-07 12:59:25

Authorized access to files and directories?

It is necessary to organize access for authorized users to their home directory. Each user has his own directory like USER1 -> /USER1, USER2 -> /USER2.
1. How to organize automatic presentation of the home directory to users as:
User 1 is authorized and redirected to localhost/home where his home directory (../USER1) is displayed
2. How to organize access to his files and deny access to other unauthorized users
User 1 sees / home and sees its documents, User 2 sees its version of localhost/home as (../User 2) but does not see ../User 1/
3. Is it possible to access files directly without reading the content and passing it to the client with PHP?
Essence of the question: I would like to get something like DropBox:
To access the file:
https://dl-web.dropbox.com/get/document.docx?w=AAB...
To organize a custom directory:
https://www.dropbox.com/home
Any tips, books, articles or simple tips about the organization of the document manager are welcome!
PS: I am writing a web application for a diploma, so the question may not be formulated completely correctly.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
justabaka, 2013-12-07
@Meridian312

Directory listing: web application
Access control: web application protected from directory traversal
Content delivery: nginx + X-Accel-Redirect ( toster.ru/q/55916 )
Essence: when a file is requested, the validity of the session and the user's access are checked. If everything is in order, a response is sent to nginx with the X-Accel-Redirect header added, by which nginx understands that when sending the response, the user needs to additionally give the file, which happens. I think there is no need to explain anything about the legendary speed of returning statics by nginx.

A
Alexey Sundukov, 2013-12-07
@alekciy

What is the specialization? Just wondering who is given diplomas with such a theme.

E
Eugene, 2013-12-07
@Nc_Soft

nginx secure link
and listings via php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question