Operating System - HP-UX
1847664 Members
3825 Online
110265 Solutions
New Discussion

Re: /etc/mnttab: permission denied

 
SOLVED
Go to solution
yuli_3
Advisor

/etc/mnttab: permission denied

dear,

When i run command "bdf" as user, i got an error:
$ bdf
bdf: Cannot open /etc/mnttab: Permission denied

but, if we issued this command as root, output for bdf comnad is run normally.

someone can help me, please !

$ uname -a
HP-UX hqhpux36 B.11.00 A 9000/800 1193404627 two-user license
$ ll /etc/mnttab
-rw-r--r-- 1 root root 753 Jun 29 16:11 /etc/mnttab
$ ll /usr/bin/bdf
-r-xr-xr-x 1 root bin 28672 Mar 21 2003 /usr/bin/bdf
11 REPLIES 11
Vibhor Kumar Agarwal
Esteemed Contributor

Re: /etc/mnttab: permission denied

Check whether you have read and execute permissions on the parent directories i.e. /etc/
Vibhor Kumar Agarwal
Mark Nieuwboer
Esteemed Contributor

Re: /etc/mnttab: permission denied

Can you read the file /etc/mnttab it could be corrupt.
yuli_3
Advisor

Re: /etc/mnttab: permission denied

permission for /etc:
$ ll | grep etc
dr-xr-xr-x 25 bin bin 6144 Jul 4 10:14 etc

I can read /etc/mnttab file:
$ more /etc/mnttab
/dev/vg00/lvol3 / vxfs log 0 1 1120061449
/dev/vg00/lvol1 /stand hfs defaults 0 0 1120061450
/dev/vg00/lvol8 /var vxfs delaylog,nodatainlog 0 0 1120061467
/dev/vg00/lvol7 /usr vxfs delaylog,nodatainlog 0 0 1120061467
/dev/vg00/lvol6 /users/home vxfs delaylog,nodatainlog 0 0 1120061467
/dev/vg00/lvol5 /tmp vxfs delaylog,nodatainlog 0 0 1120061467
/dev/vg00/lvol07 /oracle vxfs delaylog,nodatainlog 0 0 1120061468
/dev/vg00/lvol4 /opt vxfs delaylog,nodatainlog 0 0 1120061468
/dev/vg00/appstemp /oasis/temp vxfs delaylog,nodatainlog 0 0 1120061468
/dev/vg00/lvaudit /auditlog vxfs delaylog,nodatainlog 0 0 1120061468
/dev/vg02/lvol1 /appstest vxfs delaylog,nodatainlog 0 0 1120061468
/dev/vg02/lvol2 /apps11.5.9 vxfs delaylog,nodatainlog 0 0 1120061468
Victor Fridyev
Honored Contributor
Solution

Re: /etc/mnttab: permission denied

Hi,

Could you please check whether latest file system patches are installed on your machine ?

Run chmod 4555 /usr/bin/bdf.

This will resolve the problem

Regards
Entities are not to be multiplied beyond necessity - RTFM
yuli_3
Advisor

Re: /etc/mnttab: permission denied

victor,

when i changed to 4555 /usr/bin/bdf,
problem is resolved.
$ ls -ld /usr/bin/bdf
-r-sr-xr-x 1 root bin 28672 Mar 21 2003 /usr/bin/bdf

but why i must do it ??in another server, permission for /usr/bin/bdf, only 555.
Vibhor Kumar Agarwal
Esteemed Contributor

Re: /etc/mnttab: permission denied

Yes Yes,

I am also eagerly waiting to know what is this 4555
Vibhor Kumar Agarwal
Victor Fridyev
Honored Contributor

Re: /etc/mnttab: permission denied

Yuli,

bdf can work without s-bit as well. Check whether /etc/mnttab with
fuser -u /etc/mnttab
Usually bdf itself locks the file. May be on one of the servers the file is locked by a mistake.

HTH
Entities are not to be multiplied beyond necessity - RTFM
yuli_3
Advisor

Re: /etc/mnttab: permission denied

4555 mean that users that not owner of file can execute this file (/usr/bin/bdf), but in another servers, permission for /usr/bin/bdf only 555 and all users can execute this file without error.confuse...
Devender Khatana
Honored Contributor

Re: /etc/mnttab: permission denied

Hi,

4xxx means setting UID on the file. Which means that whoever is authorised to execute the file can excute this but this will be always executed as the user who is owner of the file so here root. This makes sense as the /etc/mnttab could have locked by some user.

HTH,
Devender
Impossible itself mentions "I m possible"
Amit Agarwal_1
Trusted Contributor

Re: /etc/mnttab: permission denied

Similar to 'passwd' the command 'bdf' is also a setuid program. When executed, it assumes the root priviledges to read /etc/mnttab file and provide the output. The ll output on your system shows that it is missing that setuid permission, hence this failure.

$ chmod 4555 /usr/bin/bdf

Once you execute chmod you can see that first 'x' in permission string gets changed to 's'. You must run the baove command as root.

Hope this helps.

-Amit
yuli_3
Advisor

Re: /etc/mnttab: permission denied

ok..thanks for you all,

now i am understand.

many thanks,

yuli