Penguin
Annotated edit history of EACCES version 4, including all changes. View license author blame.
Rev Author # Line
1 PerryLorier 1 !!!Permission Denied
2
3 This is often confused with [EPERM], to quote SUSv3:
4
5 ;:''Permission denied. An attempt was made to access a file in a way forbidden by its file access permissions.''
2 JohnMcPherson 6
7 Examples include:
3 JohnMcPherson 8 * trying to lower a process's nice(1) value (ie make it a higher priority process) when you are not the superuser. (nice uses the setpriority(2) call, not the nice(2) call which returns EPERM).
9 * trying to unlink(2) (delete) a file when you do not have write access to the file or the directory, or open a file for reading when you do not have read access.
4 IanMcDonald 10 * doing something [SELinux] prohibits.
3 JohnMcPherson 11
12 In general, EACCES seems morely to be used for file permission conflicts, while EPERM seems more likely to be used for process-related permission conflicts. But you can see that even system calls use them differently.