Mac 10.11.5 (El Capitan) here. I just tried creating a directory under /opt:

myUser$ mkdir /opt/bupo
mkdir: /opt/bupo: Permission denied

Why would I need to prefix this with sudo and then authenticate myself in order for this command to work? If I were to use sudo mkdir /opt/bupo, then what user would actually be creating + owning this bupo/ directory, would it be root?

1 Answer 1


Only the root user can write to the root of the file system. So, it is safe to assume that the /opt directory is owned by root. The default umask would make that directory read, write, and executable to the owner; read and executable to the group; read and executable to others/everyone.

If you use sudo mkdir /opt/bupo the directory would be owned by the root user.

You must log in to answer this question.

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