Jump to content

Understanding My Directory


lanmind

Recommended Posts

Hello,I am having such a problem understanding how my directory on a shared hosting/linux server works.My document root is /html and this is where I currently have my default.html file. I can't put anything above this.1. If I put sensitive data in a "/html/passwords" folder is this considered "out of the document root" and out of the public eye?2. If I make another directory "/html/public" and put my default.html file there then would the directory "/html/passwords" for sensitive data be out of document root?3. How do I know what the "highest" directory is visitors can get to?4. Do my php files need to have execute permissions for others? (707)Execute permissions is defined as: The execute permission, which grants the ability to execute a file. This permission must be set for executable binaries (for example, a compiled c++ program) or shell scripts (for example, a Perl program) in order to allow the operating system to run them. When set for a directory, this permission grants the ability to traverse its tree in order to access files or subdirectories, but not see files inside the directory (unless read is set).5. Does execute permissions mean to execute a script?Confusing...

Link to comment
Share on other sites

  • 1 month later...
1. If I put sensitive data in a "/html/passwords" folder is this considered "out of the document root" and out of the public eye?
No this is still reachable by anyone who knows the folder is there.
2. If I make another directory "/html/public" and put my default.html file there then would the directory "/html/passwords" for sensitive data be out of document root?
No still reachable. The only way to make data out of the document root is to move it above html, but this makes it unaccessable over the internet. There is a way,that i am not exactly sure of, to password protect pages and sometimes make it so only certain ips can access it.
3. How do I know what the "highest" directory is visitors can get to?
It is set in the config file that your web server reads. If you have your default.html in /html and that shows up when you browse to your ip/web address then that is the highest part you can access on the web. (Unless you can figure out some crazy stuff with php that lets you go further up)
4. Do my php files need to have execute permissions for others? (707)
Do not quote me on this, but if i rememer right yes.
5. Does execute permissions mean to execute a script?
yes, php is a script that allows for dynamic data to be displayed on your webpage; whether it is from a database (mysql, xml, etc.) for just determined by a bunch of statements that filter data being "fed" to it.
Confusing...
I was too when I first started; well I can probably speak for most of us, we were all confused/overwhelmed at first. It does get easier, just hang in there.
Link to comment
Share on other sites

yes, php is a script that allows for dynamic data to be displayed on your webpage; whether it is from a database (mysql, xml, etc.) for just determined by a bunch of statements that filter data being "fed" to it.
That's interesting, I didn't think that PHP files were executed, as such (unless you are using it as a CGI module?). What do other people know?
Link to comment
Share on other sites

That's interesting, I didn't think that PHP files were executed, as such (unless you are using it as a CGI module?). What do other people know?
I took a linux class a couple months ago and we touched apache server a little and I am almost positive we had to chmod execute. But like I said I'm not too certain. Could of been something else.
Link to comment
Share on other sites

I don't know about the execute permission, but I was just wondering whether the PHP file was actually "executed" in the traditional UNIX sense, or whether it was just sent to the PHP interpreter and the results sent to Apache.

Link to comment
Share on other sites

I don't know about the execute permission, but I was just wondering whether the PHP file was actually "executed" in the traditional UNIX sense, or whether it was just sent to the PHP interpreter and the results sent to Apache.
I would think so. It is a script. Ill do some searching and see if I can come up with anything.After researching for 5-10 minsResearch #1Research #2 - When you install a forum system, sometimes the directions tell you to chmod a config file. Im pretty sure the config file was php (then again i could be wrong). I wish i was running a linux box atm to test it out.Anyone else find something to back this or not?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...