Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

wheel

let me start by saying I love coding by hand, yet lately it's all in terminals. Don't get me wrong I love vim and have learned alot, however niether will allow me to save.


the error says your not a member of wheel, or just crash.


I've set /Library/WebServer to read / write for myself wheel and everyone, yet I still can not save any of my edits; unless

I open up a terminal after the code is coppied from komodo edit 8

sudo rm -rf index.php

sudo vim index.php

i

cmd+v

esc

:wq

then I open a web browser and type

127.0.0.1/index.php


this is my work around. someone please say something appley... =)

MacBook Pro, OS X Mountain Lion (10.8.5)

Posted on Sep 21, 2013 12:43 PM

Question marked as Best reply

Posted on Sep 21, 2013 7:01 PM

If this is OS X client, then I'll assume you've activated and configured the web server, as web sharing was removed. If you're using OS X Server here, then the web directory is /Library/Server/Web/Data/Sites directory.


To use sudo, your login user needs to be an administrator. You probably know that, of course.


If your user is administrator and thus can use sudo, then to see why your save is probably failing, use the command:


ls -aled@ /Library/WebServer


This command will view the ownership and protection and ACL settings on the directory. There's probably a setting embedded there that's preventing file writes into that directory. If you're not sure what that means, post the settings and we'll have a look.


Within vim, if you're using Command V (⌘V) to insert blocks of text, then you'll probably want to use :set paste to disable vim's automatic formatting, and then :set nopaste once the Command V (⌘V) has been completed.


Web sharing was removed in OS X client 10.8, so you're going to have to get Apache going on your own, or install OS X Server.


FWIW and you may already be aware of this, the sudo rm -r command is exceedingly hazardous.

4 replies
Question marked as Best reply

Sep 21, 2013 7:01 PM in response to Community User

If this is OS X client, then I'll assume you've activated and configured the web server, as web sharing was removed. If you're using OS X Server here, then the web directory is /Library/Server/Web/Data/Sites directory.


To use sudo, your login user needs to be an administrator. You probably know that, of course.


If your user is administrator and thus can use sudo, then to see why your save is probably failing, use the command:


ls -aled@ /Library/WebServer


This command will view the ownership and protection and ACL settings on the directory. There's probably a setting embedded there that's preventing file writes into that directory. If you're not sure what that means, post the settings and we'll have a look.


Within vim, if you're using Command V (⌘V) to insert blocks of text, then you'll probably want to use :set paste to disable vim's automatic formatting, and then :set nopaste once the Command V (⌘V) has been completed.


Web sharing was removed in OS X client 10.8, so you're going to have to get Apache going on your own, or install OS X Server.


FWIW and you may already be aware of this, the sudo rm -r command is exceedingly hazardous.

Sep 22, 2013 6:58 AM in response to MrHoffman

First off Thanks For the Appleness.

I believe this is what happened

brew install apache2 mysql php


For my early 2011 10.8.5 the directory is

/Library/WebServer/Documents/index.php


fun thing is in users/groups you can change your hostname

hostname.local


I'm not admin, yet I'm feeling an alias comming on in my .profile

alias led='ls -aled@';


triter:~ eff$ led /etc/apache2

drwxrwxrwx 11 root wheel 374 Sep 22 05:54 /etc/apache2

triter:~ eff$


for what ever the reason that it is I can not figure out why

I can now save any of my files in /Library/WebServer/Documents

Sep 22, 2013 10:18 AM in response to Community User

Ah, OK. Please ignore my previous response; it's not applicable here. Loading your own Apache and php tools will displace whatever OS X (or the OS X Server add-on, when that's been purchased) is doing here, and the replacements usually won't use the standard configurations and locations, and will usually encounter port conflicts with the integrated tools when those aren't shut down. There's no MySQL in 10.7 OS X Server and later, nor in client, so that won't conflict.

Sep 23, 2013 7:14 AM in response to Community User

Setting the write bit for everyone (others, the world) is never a good idea for system files. This- drwxrwxrwx 11 root wheel 374 Sep 22 05:54 /etc/apache2 is wrong. Since you wish to use a GUI editor to produce files then configure httpd.conf to include your home folder's Sites folder and use this location as a sandbox for testing. You can then copy files to the main document root location.

wheel

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.