Directory Permissions

Posted on 2003-02-24
Medium Priority
Last Modified: 2010-03-04
Hi I recently installed Apache 1.3 on an XP machine. I then installed mySql and php. All seems to operate okay. I created a subdirectory under htdocs and I cannot view any files (php,html) in the subdirectory below the htdocs directory. I think I have not set permissions to allow the viewing in subdirectories. Does anyone know of what I may have not set up in the the Apache config file. . I just wanted to create subdirs  for testing purposes on localhost. I hope I  made myself clear there. Thanks - hopefully you might have some ideas.
Thank You
Tony V
Question by:mackula
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8042380
you should be able to get to there, especially if you put something there.  what happens when you use the shell to get to the htdocs directory?

this shows how properties are set on directories


In UNIX, the magic command for performing this task is "chmod".

UNIX have three types
of permissions: USER (the owner of the file), GROUP (The security group
you are in), and OTHER (For the world to see. Each digit in the number
above corresponds to one of these categories. The first digit is user, the
second digit is group, and the final digit is other.  Thus, in the example
above, 7=USER, 7=GROUP and OTHER=5.

The actual value of the digit determines the permissions granted to that
area. Permissions consist of three numbers -- 4 for read, 2 for write, and
1 for execute access.  By adding these numbers together, you form the
permissions that make up one digit. For example, 4 + 2 + 1 = 7 which
grants read, write, and execute permissions. 4 + 1 = 5 which only grants
read and execute permissions. Thus, 755 grants 7 (read, write, execute) to
the owner of the file, and 5 (read and execute) to the group the file is
in and the world. Below is a chart which will can be used as a quick

         U   G   W
     rwx rwx rwx      chmod 777 filename        
     rwx rwx r-x     chmod 775 filename
     rwx r-x r-x     chmod 755 filename
     rw- rw- r--     chmod 664 filename
     rw- r-- r--     chmod 644 filename

     U = User
     G = Group
     W = World

     r = Readable
     w = writable
     x = executable
     - = no permission


Expert Comment

ID: 8042635
Apache by default on Windows allows browsing of subdirectories.  We may need a little more information on what you are trying to view in order to solve this one.  Can you please specify the URL as you type it in?  Also, have you checked to be sure that it's an html file that you are trying to view and not just an htm file?

As far as PHP you have to add an Application Type to the httpd.conf and then stop and restart the apache service in order to view PHP files as anything other than just the source.  If you haven't done this you can use something like:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php3
Action application/x-httpd-php "/php/php.exe"

And then restart the service.

Hopefully that will help.


Author Comment

ID: 8043882
Thank you for the responses. 1st for JOligario:
I understand if this were a UNIX env. I'm working on Windows XP. And "goodatunix" My sample url would be "http://localhost/test/test.html"  Page would not display. However, the "manual" subdir under htdocs displays its .html pages. If I make a copy of that directory, rename it, delete the files, create a test html in that dir, I can view the page. Wheew!! Sorry for the rambling.

Accepted Solution

goodatunix earned 200 total points
ID: 8044192
Okay then...  I would suggest you find what user the apache service is running as.  You can do this by running task manager, going to processes and checking what the apache.exe process is running as (SYSTEM in my case).

Then right-click on the folder of choice and select Sharing and Security.  Go to the Security Tab and make sure that the user has read permissions to that folder.  If the user doesn't have access you'll need to add that user and then select the allow box for Read.


Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question