Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

you don't have permission to access

Status
Not open for further replies.

redpotato

Programmer
Feb 15, 2010
24
CA
I am not sure that I explain right.
I have create LAMP server and modified httpd.conf to enable user folders for open php files in browser.
by the way, when I open a php file which is under userfolder/public_html/test.php
and I tried to open
or it gives me Forbidden, you don't have permission to access /~userfolder on this server.

so I checked the permission list of the folders
and getting like this.
-> ls -l /home
-> drwxr-xr-x. 34 userfolder userfolder 4096 Oct 28 14:28 userfolder
and public_html has
-> ls -l /home/userfolder
-> drwxrwxr-x. 2 userfolder userfolder 4096 Oct 28 14:28 userfolder

should i make something more changes??
could someone give me some tips?? please??

Thank you for reading.
 
This is current one that I modified httpd.conf

<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disabled

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html
#UserDir disabled root

</IfModule>

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
 
I am not sure about the modules you have referenced in your posts, but I ran into this problem once before where the users had a web page directory in their home folders.

In addition to the public html folders, the entire path needed to have read permissions. I would check that for starters.
 
I am not sure what you meant "Read Permission".
all the folders are "Others - Folder Access, Access Files" are given.
 
What I meant is that if you are trying to use a folder for a web page, that folder as well as its parent folders need to be readable by your web server. For example, lets say you have this structure

/users/joe/public_web/home_page

Each of the folders, i.e. the document tree, must be read accessible by the server, not just home_page.
 
there is no read accessible.
there are only Access Files which set already
 
Access Files"?

Specifically, what I meant to say was that the read permission should be set on every directory in the chain, not just he folder and files that contain the web page HTML.

Also, are you certain you have the document root for each virtual host setup properly and pointing to each users public HTML folder?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top