Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Online file storage (personal cloud, in essence) hosted on home web server  (Read 5822 times)

0 Members and 1 Guest are viewing this topic.

zeroburn

    Topic Starter


    Hopeful

  • Knowlege will take you further than any guide
  • Thanked: 2
    • Yes
    • Jared Kat Enterprises
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Ok, so, i want to upload some files to the net so i have access to them at all times, at any computer, however, i am afraid this can run into copyright laws about this if not done right.

Right now, i just have a PHP page that asks for a password before showing the page with the file links, but this is not secure simply because of the reason someone could just type in the URL of the folder with the files and bypass the password.

How should i be going about this, if i should be at all. Thanks.

(ps, i am the person who likes to do anything for free and without restriction, which is why i am doing this the way i am)
I consider myself a hacker. Not in the way of "I can break into your facebook" but in the way, I like to learn as much as I can, about anything i can. I don't just like having things fixed, I like to understand why it was broken and why a particular solution fixed it. It is just how I am, and how I will always be. As teachers have said before, you cant learn if you don't figure it out in your own mind.

zeroburn

    Topic Starter


    Hopeful

  • Knowlege will take you further than any guide
  • Thanked: 2
    • Yes
    • Jared Kat Enterprises
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
For now, i have it set up to link to files in another directory using a PHP script to automatically detect the files inside the files folder. The files folder has an index.html file with an error for the user to see when they try to enter in the directory URL, however, my php script is naming the files from the files directory, (which is in another folder) but tries to open the files from the index current location.

<?php
    $path = "files";
    $dir_handle = @opendir($path) or die("Unable to open $path");
    while ($file = readdir($dir_handle)) {
    if($file == "." || $file == ".." || $file == "index.php" )
        continue;
        echo "<a href=\"$file\">$file[/url]
";
    }
    closedir($dir_handle);
?>

i want to know how to fix this. thanks

the file layout is like such

files
|---index.php
|---password_protect.php
|---style.css
|---bg.jpg
|---files
     |---index.html (to prevent unauthorized access)
     |---file1
     |---file2

ext.

I consider myself a hacker. Not in the way of "I can break into your facebook" but in the way, I like to learn as much as I can, about anything i can. I don't just like having things fixed, I like to understand why it was broken and why a particular solution fixed it. It is just how I am, and how I will always be. As teachers have said before, you cant learn if you don't figure it out in your own mind.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
zeroburn,
It looks like you are the kind of person that likes to do nit yourself. But there already are  many kinds of service on the world wide web for data storage with secure access.

Most of the servers I have used are Linux-based, not windows. I don't think you can bypass a password protected directory in Linux. I never have been able to do that. But I don't know everything.

There is a thing called 'GoToMyPC' that many people use to get to there home computer while they are on the road. Do you mean to say that it is not secure enough to protect you?

And there ate other programs like it.

Do you want to make your own and make it more secure? With only hand coded PHP code? I don't doubt you can do lit.  But are you sure you really need to.

zeroburn

    Topic Starter


    Hopeful

  • Knowlege will take you further than any guide
  • Thanked: 2
    • Yes
    • Jared Kat Enterprises
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Im just looking for a way to make them private enough to impede access to the less savvy, and allow me access. My server is running LAMP on Ubuntu 11.10 server
I consider myself a hacker. Not in the way of "I can break into your facebook" but in the way, I like to learn as much as I can, about anything i can. I don't just like having things fixed, I like to understand why it was broken and why a particular solution fixed it. It is just how I am, and how I will always be. As teachers have said before, you cant learn if you don't figure it out in your own mind.

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
You're making this harder than it needs to be.  Why not just set up a VPN?  Or use SFTP?  Or use the cloud after all, with Ubuntu One Free?

If you want mind-blowing levels of functionality, try Alfresco.  http://wiki.alfresco.com/wiki/Download_Community_Edition
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos

kpac

  • Web moderator
  • Moderator


  • Hacker

  • kpac®
  • Thanked: 184
    • Yes
    • Yes
    • Yes
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
...or use Dropbox. :)