Accessing backup file that is in public view

Discussion in 'PHP' started by piniyini, Dec 11, 2005.

  1. #1
    I'm trying to create a backup solution for myself, came across http://php.net/fwrite and I've modified it slightly to suit my needs.

    At the moment my backup file is in my httpdocs folder which means if a user was to know the filename they would be able to download it. Does anyone know how I would be able to modify the script so that the script can access the folder above my httpdocs folder? :confused:
     
    piniyini, Dec 11, 2005 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    i have no knowledge about the script u use
    but
    if i make backups i do them either via cronjob or SSH ( via SSH i call a script i place on the server in another access-restricted folder ...

    hence the backup is made ON server
    and can be storred in a access-restricted area on the server - withint the htdocs area
    just create an access controlled folder first
    then create your back up into that folder
    it might even work with the scrript you use currently
     
    hans, Dec 11, 2005 IP
  3. piniyini

    piniyini Well-Known Member

    Messages:
    514
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    170
    #3
    hey thanks for the reply hans

    im aware of the other options, jus dont want to go that way. ill leave it as it is for now, there's a good chance a user cant figure out the filename.
     
    piniyini, Dec 11, 2005 IP