Originally posted by EgosZ
I have finally figured out a way to display a content of a txt file from local hard drive to webpage. I use a php fopen() script. I worked out perfect as I now can see the content of /etc/passwd with ease.
Just posting the solution here so anyone can have a look
One way to to access files on your system is to create links to them within the hierarchy that your web server is set up to access. In *nix, links are made using the ln command. Symbolic or soft links are most likely what you'd be interested in. You can link to either files or directories. You can also move the links about without any penalty.
It's pretty handy if you use partitions or separate drives to organize a lot information; you can then include the entire partition under a top level link.
Basically, it's another way of getting around the limitations imposed by the configuration of your web server, which can access files only contained within its defined server_root. You can also change the configuration, but that's more advanced. You should be aware of links.