1825667 Members
4030 Online
109686 Solutions
New Discussion

df -k error

 
SOLVED
Go to solution
logaraman
Regular Advisor

df -k error

Hi,

wehn i execute df -k command on a HP server as a normal user, i get the below error " df: Cannot open /etc/mnttab: Permission denied"

Suggestions pls
4 REPLIES 4
Rajeev  Shukla
Honored Contributor
Solution

Re: df -k error

See the permissions of /etc/mnttab it should have read permission for group and other i.e. -rw-r--r-- and your df command (/usr/bin/df) should have a setuid bit i.e. -r-sr-xr-x

Cheers
Rajeev
logaraman
Regular Advisor

Re: df -k error

Rajeev,

The df file in /usr/bin is r-xr-xr-x..
how do i change it as mentioned by u
Darrel Louis
Honored Contributor

Re: df -k error

Hi,

As a non root user you will get the following when the permissions on /etc/mnttab aren't correct

$ sudo chmod 640 mnttab
$ bdf
bdf: Cannot open /etc/mnttab: Permission denied
not correct:
-rw-r----- 1 root root 1460 Jun 22 11:24 /etc/mnttab
Correct:
-rw-r--r-- 1 root root 1460 Jun 22 11:24 /etc/mnttab

-r-xr-xr-x 1 root bin 73728 Jul 18 2001 /usr/bin/df

Darrel
logaraman
Regular Advisor

Re: df -k error

HI Rajeev,

Thnaks for ur reply and i have set as mentioed by u..