Answer the question
In order to leave comments, you need to log in
Personal access to files on the site?
The situation is this.
There is a personal account with access for registered users to directories with files. Implemented via FileLister. Those. all users, having logged into their personal account, see files from the specified directory. But it is necessary to make personal access to files. 1 user - 1 file so that he does not see the files of other users. Tell me, please, how can I do it?
Answer the question
In order to leave comments, you need to log in
You can make a script that, based on authorization, will give a file with content, and if there are not enough rights, then give an empty file. There are many variations, you can use not many files, but for example their identifiers and one script, such as: script.php?file=key_for_file, you can create files with keys inside. Well and the rights to implement on the basis of a DB.
PS You can try to implement on the basis of unix rights, but there will be too close integration with the system, it seems to me that this is not worth doing for a public site.
I don't know how your FileLister works, but... Is
creating a folder for each user not an option?
We take md5 (userid) and create a 3-level folder. In FileLister we pass the address of this folder.
The rights to exercise I think will not be a problem.
This is, of course, if it's customized for you.
The best option would be to store files as you like, and issue them only depending on authorization.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question