#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    3
    Rep Power
    0

    [Need Help] Directory Permissions


    Hey guys, I am currently working on a project where a user on a site can upload files and also download files. I only want certain users to have viewing capabilities of certain directories. All of the files that are uploaded are stored in a mysql database and can be downloaded from there as well. Does anyone have any idea how to make it so that certain users can only see a specific directory or have access to only their directory? All of the users are stored in a mysql database as well and each user has their own unique user id.
  2. #2
  3. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    Maybe by putting the files outside the webroot. Than once a user is logged in he has access to a script that reads the file?
    http://php.net/manual/en/function.readfile.php
    Last edited by aeternus; January 3rd, 2013 at 08:46 PM. Reason: spelling

IMN logo majestic logo threadwatch logo seochat tools logo