 |
 |
Getting "Sites" folder back
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Palo Alto, CA
Status:
Offline
|
|
I seemed to have managed to erase my "sites" folder which I used for testing web stuff( php mainly).
Now when I do a:
http://10.0.1.2/~myusername
I get a "You don't have permission to access /~myusername/ on this server" instead of my sites.
I can still go to http://10.0.1.2/ and see sites in the root Library/Webserver folder but playing around with sites in this location seems to always cause permissions problems.
Any idea how to restore my Sites folder back to normal?
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Dec 2000
Location: Málaga, Spain, Europe, Earth, Solar System
Status:
Offline
|
|
Navigate to your home folder, make a new folder and name it "Sites".
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: England
Status:
Offline
|
|
Originally posted by barbarian:
Now when I do a:
http://10.0.1.2/~myusername
I get a "You don't have permission to access /~myusername/ on this server" instead of my sites.
Separate issue.
My sites folder is still there, but I get the permission error. On my system, I can still specify files within the sites folder, I just can't do directory browsing any more.
Amorya
|
|
What the nerd community most often fail to realize is that all features aren't equal. A well implemented and well integrated feature in a convenient interface is worth way more than the same feature implemented crappy, or accessed through a annoying interface.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Palo Alto, CA
Status:
Offline
|
|
Navigate to your home folder, make a new folder and name it "Sites".
That was the first thing I tried. This doesn't set up the folder so that it's recognized by the build in sharing. You still get the "I get a "You don't have permission to access /~myusername/ on this server""
(Last edited by barbarian; Dec 4, 2003 at 10:37 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status:
Offline
|
|
My Sites folder has me as the owner (read/write), 'staff' as the group (read only) and read only for others.
You might need to reconfigure Apache so that it knows what to serve up when a request comes in. Maybe there is some stuff here which is helpful: http://httpd.apache.org/docs/
Another approach would be to use Weblock which is GUI front end to Apache configurations. I think there is an option there to serve up files from a folder other than /Sites and /Webserver which means that it must be able to configure other folders with all the correct Apache settings which is a bit like your situation.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Jul 2001
Location: Chicago, IL USA
Status:
Offline
|
|
Your folders will need to be world-executable for Apache to allow you to browse them. The files contained within them should only be world-readable.
Make sure that proper permissions are set. If Apache didn't know where your Sites folder is, it would likely have responded with a 404 not found error. Because it says that you don't have permission, you probably need to make the folder world-executable.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Dec 2000
Location: Málaga, Spain, Europe, Earth, Solar System
Status:
Offline
|
|
Repair disk privileges maybe can fix it.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Palo Alto, CA
Status:
Offline
|
|
chmod 775 does allow me access to some files but oddly enough it is more limited than before.
I used to be able to put in folders and when I navigated to the sites folder, I could see a directory listing. Now I can only access .html pages. Now if i don't have an index file I get a "you don't have permission" message.
I tried doing a chmod 777 which I thought would fix the problem but no dice.
Anyway it's so weird that nobody seems to know how to restore this properly.... Right now as a last resort I've created another user and I just use fast user switching to dump things in the folder (I can browse the folder normally from my user area)
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2003
Location: SoCal
Status:
Offline
|
|
Are you sure you gave +x to the world for the folder you want listings for?
Also, did the httpd.conf file change
you may need to add "Indexes" to your Options list.
Good luck.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Mar 2001
Location: Milan
Status:
Offline
|
|
Originally posted by barbarian:
I'm not that dumb. Obviously I can create a folder.
Wrong attitude when asking for help and you don't give any information on why this started happening. Did you do an OS upgrade or change anything?
The way this folder behaves when accessing it through the Apache server on your machine isn't only defined by the permissions you set on the sites folder. There are also settings in the Apache config files which can affect this. These kinds of things may be modified when you do an OS upgrade. (Apple may have changed them for security reasons.)
The main config file for Apache is at /etc/http/httpd.conf
There is a section which deals with User Directories. You can find documentation on this on your own machine by going to this link:
http://10.0.1.2/manual/mod/core.html#directory
I have looked a bit further and there is also a config file specific to each user which is stored in /etc/httpd/users
It looks as if the default settings in there should be giving the behavior you are looking for as they set Indexes to be on.
I'll have to stop here as i need to go to work but I'll check again later.
|
|
Nothing to see, move along.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Apr 2001
Location: Palo Alto, CA
Status:
Offline
|
|
Ah. Many thanks. That solved it... I just copied over the conf files from another user...
--
you don't give any information on why this started happening.
-I accidentally deleted the sites folder. No system upgrade or anything else odd.
---
So my process in case anyone runs into the same problem was:
-recreated it and named it Sites
-chmodded it 775 (777 is unecessary and possibly dangerous)
- copied over another users /etc/httpd/users/httpd.conf
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Jul 2001
Location: Chicago, IL USA
Status:
Offline
|
|
Originally posted by barbarian:
Ah. Many thanks. That solved it... I just copied over the conf files from another user...
--
you don't give any information on why this started happening.
-I accidentally deleted the sites folder. No system upgrade or anything else odd.
---
So my process in case anyone runs into the same problem was:
-recreated it and named it Sites
-chmodded it 775 (777 is unecessary and possibly dangerous)
- copied over another users /etc/httpd/users/httpd.conf
The default is 755, and is the minimum allowed by the OS. 775 gives anyone in the same group as you (probably staff) the ability to add and remove files from your Sites folder.
Actually, I shouldn't say that 755 is the minimum. 705 would work as well, but that would give your group members no permissions at all (though they would have the same access ability as anyone else when using a browser to access your Sites folder).
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|