Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidentally removed the "staff" group from a set of folder permissions and I have no idea how to get it back.

Is there a way to get it back, and if so how?

share|improve this question
up vote 2 down vote accepted

Not quite sure what you mean here. You lost the staff group declaration in /etc/group?

mress:10003 Z$ dscl . cat /Groups/staff
AppleMetaNodeLocation: /Local/Default
GeneratedUID: ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000014
GroupMembers: FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000000
GroupMembership: root
Password: *
PrimaryGroupID: 20
RealName: Staff
RecordName: staff
RecordType: dsRecTypeStandard:Groups
SMBSID: S-1-5-32-545
mress:10004 Z$ grep '^staff' /etc/group
staff:*:20:root

The file definition is only used before Directory Services is started during boot — and I suspect not even then.

If you mean the folders are no longer in group staff, use chown staff to fix them. Alternately, use /Applications/Utility/Disk Utility.app, select your boot drive from the sidebar, and click "Repair Disk Permissions".

share|improve this answer
    
I have a folder, and I was changing the permissions in the Get Info window and I removed staff, and need to get it back. – tylermwashburn Mar 19 '11 at 3:44
    
OK, use the Repair Disk Permissions thing I mentioned above. – geekosaur Mar 19 '11 at 3:45
    
It's not an Apple installed folder. Will this do anything? – tylermwashburn Mar 19 '11 at 3:49
    
Did it come from an installable package (pkg or mpkg)? If so, there's a permissions record for it. If not... I'd wonder why it's using group staff to start with. At worst, though, you can use Terminal: sudo chgrp staff folder. – geekosaur Mar 19 '11 at 3:53
    
No. I made it. I use it as my root folder for Apache and I had been using ~/Sites, but then I made a new folder in my Dropbox to sync across computers. I just copied the Sites folder into Dropbox and renamed it. My Apache daemon was running under the staff group, because I needed access to some staff only folders, so this folder needed to be a staff folder too. I copied the Sites folder again so it has permissions now, and I changed some otherns so that I could put Apache back under the _www group. All is good now. Thanks for the help. :) (I probably should've given those details before..) – tylermwashburn Mar 19 '11 at 4:32

You must log in to answer this question.

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