1

How do I make there be no group owner of a file in Mac OSX, since

chgrp nogroup file

doesn't work? If I try, the group owner doesn't change at all.

John Militer
  • 773
  • 4
  • 14
  • 29

2 Answers2

2

Use chgrp nobody file instead.

don_crissti
  • 79,330
  • 30
  • 216
  • 245
John Militer
  • 773
  • 4
  • 14
  • 29
2

You can't. Every file has to have an owner and a group.

There is, however, a common convention of having a user called nobody (usually with uid 65534) and a group called either nobody or nogroup (usually with gid 65534).

e.g. on my debian systems, I have:

$ getent group nogroup
nogroup:x:65534:

$ getent passwd nobody
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin

if nogroup doesn't exist on your Mac, try chgrp nobody file instead.

cas
  • 1
  • 7
  • 119
  • 185
  • This answer jogged into mind a question I've had for a while, which I decided to [post separately](http://unix.stackexchange.com/q/272047/135943). – Wildcard Mar 25 '16 at 04:18