The difference between EACCES and EPERM

What is the difference between EACCES and EPERM? EPERM is described here as β€œnot superuser,” but I usually associate it with EACCES. In fact, I can’t remember that I have ever seen EPERM in real life.

+4
source share
2 answers

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 catalog
  • reboot()
+5
source

Linux, EACCES EPERM ! - ...

  • EACCES "Permission denied" , . root / .
  • EPERM " " , , , root . :
    • chmod FAT ( )
  • , Linux EPERM, EACCES.
+2

Source: https://habr.com/ru/post/1626060/


All Articles