EACCES almost always used when a path was passed to a system call that was not available to the current user.
EPERM used in various situations when you need to be root to perform an action, for example
kill() in a process that you donβt have.link() in the catalogreboot()
source
share