?
Solved

WAMP & Windows XP home file permissions

Posted on 2009-02-22
14
Medium Priority
?
1,996 Views
Last Modified: 2013-12-13
I've installed WAMP on my new Netbook, which unfortunately has Windows XP home Edition pre-installed.
WAMP works well under the standard folder, but when I'm changing the DocumentRoot to another folder, I'm just getting a "You don't have permission to access / on this server.".
0
Comment
Question by:anselmdk
  • 4
  • 4
  • 2
10 Comments
 
LVL 8

Expert Comment

by:Dirtpatch-Jenkins
ID: 23706533
click on the wamp icon goto apache then httpd.conf -  open it

look for
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

change it to
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    allow from all
</Directory>

see if that handles it
0
 
LVL 8

Expert Comment

by:Dirtpatch-Jenkins
ID: 23706536
Note: you'll have to restart wamp for these changes to take effect.
0
 

Author Comment

by:anselmdk
ID: 23706764
i did it and off course restared WAMP, but nothing happened
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 51

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 23825146
This could be because the server is running under a user account that does not have access to the folders in question.  Open your httpd.conf or associated include and look for the User directive.  The user account specified there should have minimum of read rights to the DocumentRoot you are trying to specify.  

If you are using PHP or other server side languages, and they load their own executable, you may have to add permissions for those users as well.  If your web application writes to the directories, make sure they have the appropriate access.  
0
 

Author Closing Comment

by:anselmdk
ID: 31549850
It worked!
Sorry for the late reply.
In httpd.conf I changed User to root.
Furthermore I had to change  tag to reflect my new documentroot location, and even .htaccess files are read perfectly!
0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 24322419
>>> In httpd.conf I changed User to root.

NO!!!  CHANGE IT BACK IMMEDIATELY!  You should NEVER run anything as root, most especially not a service that is designed to publish data from the local system onto the internet.  The solution here is definitely not to change the user running Apache, but to change the permissions/ownership on the directories and files in question.  Yes, Apache can now read and serve your site content, but it can also read and serve /etc/passwd, /etc/shadow, and any number of other, protected files that should not be on public display.
0
 

Author Comment

by:anselmdk
ID: 24323453
Again, that was my initial problem - how to set access rights in Windows Xp Home.
I would never use the home edition if it hadn't been bundled with my Netbook. I only use my Netbook while at home or travelling, so no import data is prone to get 'hacked'.
But, how would I change access rights in Windows xp home?
0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 24323489
You would set the NTFS permissions for the appropriate user.  All pages are served through Apache's user.  That means any client browsing through it will have the same file system access.  

So, say Apache is running under the user 'nobody'.  You give your site a DocumentRoot of c:\inetpub\mysite.  When looking at the NTFS permissions for that directory, make sure 'nobody' has a minimum of read, read & execute, and list contents permissions.  For directories, they need traverse also.  When adding a user to the NTFS permissions list, giving them read & execute generally gives all the access needed.  If your application needs to write to directory, then modify writes are probably appropriate, maybe a little less if you're worried about deletions.

Looking back at your original post, you stated the error was no permission to access '/' on this server.  If a default document does not exist and you do not allow directory browsing, browsing to the root will generate a similar error.  Try to browse to a specific page to troubleshoot permissions.
0
 

Author Comment

by:anselmdk
ID: 24323635
You were right!
I changed the user back to 'Deamon', but this time change the 'Directory' settings to reflect my new location as well. Hence, you'll have to change both 'DocumentRoot, and 'Directory'.
I guess the 'Directory' setting set up additional setting for each directory, as the .htaccess settings.

Problem solved - even without changing the user!
0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 24324159
That sounds much better.

The <Directory> container is another thing entirely...something not mentioned up to this point.  You have to remember that Apache is probably setting some file system permissions by default, and you may have to open up those permissions within Apache.  This is normally done inside a <VirtualHost>, <Directory>, or <Location> container.  See the Apache docs for more information on these:

http://httpd.apache.org/docs/2.2/mod/core.html#directory
http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

Unable to change the program that handles the scan event from a network attached Canon/Brother printer/scanner. This means you'll always have to choose which program handles this action, e.g. ControlCenter4 (in the case of a Brother).
Each password manager has its own problems in dealing with certain websites and their login methods. In Part 1, I review the Top 5 Password Managers that I've found to be the best. In Part 2 we'll look at which ones co-exist together and why it'…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Suggested Courses

621 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