Linux EACCESMedium

Permission denied in Linux: access denied

The EACCES (Permission denied) error occurs when the user does not have sufficient rights to access a file, folder, or execute a command.

Updated at February 12, 2026
5-15 min
Medium
FixPedia Team
Применимо к:UbuntuDebianFedoraArch Linux

Error Permission denied (code EACCES) in Linux means that the current user does not have the necessary rights to perform the operation. It can occur when running scripts, opening files, or trying to modify system directories.


Main Causes

  • Insufficient permissions on the file or folder
  • Missing execute bit on the script
  • Attempting to access system directories without sudo
  • Incorrect file owner

Method 1: Run with sudo

If the operation requires administrator rights:

sudo command

Example:

sudo apt update

Method 2: Add execute permission

If the error occurs when running a script:

chmod +x script.sh
./script.sh

Method 3: Check permissions

Check the current permissions:

ls -l filename

If you need to change the owner:

sudo chown user:user filename

Method 4: Check directory permissions

Even if the file is accessible, the parent directory may be closed:

ls -ld directory

If necessary, change the permissions:

sudo chmod 755 directory

Conclusion

The EACCES error in Linux is almost always related to access rights. Using sudo, correctly setting chmod, and chown usually fully resolve the issue.

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community