| OS X - Operating System General OS operation information and support |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Nov 27, 2011
Posts: 5
![]() |
Hello.
My MAC OS is Leopard and I use the computer personally, i.e. I'm admin user. I've just started PHP, so I created a local server and changed the computer's permission to make it work. My question is why 755 doesn't work for a simple PHP program, but 777 works. Permissions for the folder and files are like this :the folder in Sites/ ---777, php files in the folder ---755 I think '7'55 should be enough because I am the admin, neither a guest nor a member of some group. However, 755 for the folder doesn't work. Would anybody help me to solve the mystery? Thanks. |
| QUOTE Thanks | |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,522
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
I highly doubt that your server instance (assuming it's a daemon) is running as your user.
You certainly should NOT run this as 777, 755 is indeed preferable. You'd need to change the owner to the user running your server instance using chown. That'd do it. mike This machine kills fascists Got # ? phear the command line! |
| QUOTE Thanks | |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,522
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
Here's the deal. Say you're running apache. Generally this is run by a non-privileged user (such as "www"). So, if you chown www <file> it should be able to execute your PHP script. This has nothing to do with the user you're logged on as. In fact, running servers as your (privileged) login would be a VERY bad idea indeed. There are a TON of exploits that exist in various daemons.
mike This machine kills fascists Got # ? phear the command line! |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,302
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Dysfunction is very much correct on this one - 777 is a terrible set of permissions for what you're trying to do. It's a "quick fix" for most problems but it's a terrible one. I understand why you'd want to do it though - PHP scripts can be frustrating if they don't have the perfect set of permissions (I can't tell you the number of times this has frustrated me). I've noticed that this problem generally pops up when you move scripts across machines. Are you doing development across machines? Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| help me tame lion! | danni1 | OS X - Operating System | 2 | 11-17-2011 12:25 AM |
| The infamous 10.5 "permissions differs on" | stejimenez | OS X - Operating System | 4 | 08-16-2009 11:07 AM |
| Disk permissions error | Pagal Haina | OS X - Operating System | 6 | 04-11-2009 06:37 PM |
| Not too pleased with new iMac | JunMacTech | Apple Desktops | 14 | 12-05-2005 07:13 PM |
| repair permissions a waste of time? | Macman | Schweb's Lounge | 5 | 05-31-2005 06:26 PM |
All times are GMT -4. The time now is 07:20 PM.
Powered by vBulletin