-bash: /dev/null: Permission Denied

Issue

After creating a new user account you may find that on login you recieve the following error,

-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied
-bash: /dev/null: Permission denied 

Solution

/dev/null is a character special device which should have read+write permissions for everybody.
Run the following to confirm the current permissions for /dev/null,

ls -l /dev/null

If the output doesnt show the permissions crw-rw-rw- then change them accordingly via the chmod command.

Rick Donato

Want to become a Linux expert?

Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial