/dev/null: Permission Denied

bash: /dev/null: Permission Denied


When a new user account is created, you may find that on login you receive the
following error:

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


/dev/null or the null device is a special file that discards all data written to it (but reports that the write operation succeeded) and provides no data to any process that reads from it. This is a character special device which should have read+write permissions for everybody.

Following command checks the current permission for /dev/null.

ls -l /dev/null

Permission for “/dev/null” file:

crw-rw-rw- 1 root root 1, 3 Aug 11 00:45 /dev/null

If the output doesn’t show the permissions crw-rw-rw- then change them accordingly using the commands given below.

chmod 666 /dev/null
mknod /dev/null c 1 3

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: