Adding an unlisted group in Mac OS X

0

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?

McKayla

Posted 2011-03-19T03:25:01.773

Reputation: 103

Answers

2

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".

geekosaur

Posted 2011-03-19T03:25:01.773

Reputation: 10 195

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. – McKayla – 2011-03-19T03:44:12.193

OK, use the Repair Disk Permissions thing I mentioned above. – geekosaur – 2011-03-19T03:45:34.930

It's not an Apple installed folder. Will this do anything? – McKayla – 2011-03-19T03:49:03.827

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 – 2011-03-19T03:53:20.880

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..) – McKayla – 2011-03-19T04:32:32.823