1

I like to edit files in my /Library/WebServer/Documents without having to run sudo all the time.

So I simply added my username abbood to the wheel group using this command:

sudo dseditgroup -o edit -a abbood -t user wheel

i verified that abbood is a member of wheel like so:

$ members wheel
abbood
root

If I run ls -l on my files in that directory.. the user is root and the group is wheel.

However as abbood I'm still required to sudo everytime I want to edit a file.. how come? how do I avoid that?

  • What do you mean by "you are required"? And what are the permissions? – techraf Jan 13 '17 at 7:47
  • ie i cannot edit files inside that directory unless if i do sudo vi index.html, it won't allow me if I just do vi index.html – abbood Jan 13 '17 at 7:49
  • How is anyone supposed to know when you show no permissions? And what do you mean by "won't allow"? Siri says "you are required to sudo"? – techraf Jan 13 '17 at 7:50
2

Answering based on system defaults (because of lack of the information in the question):

[~]# ls -ld /Library/WebServer/Documents
drwxr-xr-x  5 root  wheel  170 Feb 21  2016 /Library/WebServer/Documents/

[~]# ls -l /Library/WebServer/Documents
total 72
-rw-r--r--  1 root  wheel   3726 Feb 21  2016 PoweredByMacOSX.gif
-rw-r--r--  1 root  wheel  31958 Feb 21  2016 PoweredByMacOSXLarge.gif
-rw-r--r--  1 root  wheel     45 Jun 12  2007 index.html.en

Members of group wheel do not have write permissions to the /Library/WebServer/Documents directory nor the files inside.

Hence adding any account to the group wheel will not allow this account to write files in/to the above directory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .