Operating System - HP-UX
1832751 Members
2838 Online
110045 Solutions
New Discussion

I have Accidently removed file permission from chmod...

 
itai weisman
Super Advisor

I have Accidently removed file permission from chmod...

is there anything I can do to fix this problem
5 REPLIES 5
Mark Grant
Honored Contributor

Re: I have Accidently removed file permission from chmod...

I think you'll find another one in /sbin :)

just do "/sbin/chmod 555 /usr/bin/chmod"
Never preceed any demonstration with anything more predictive than "watch this"
itai weisman
Super Advisor

Re: I have Accidently removed file permission from chmod...

hi mark, thanks for the quick answer (i was amazed)... but it didn't help me... there is no chmod in /usr/sbin
Stefan Farrelly
Honored Contributor

Re: I have Accidently removed file permission from chmod...

There are 2 chmod binaries on any HP system, the statically linked one in /sbin and the dynamically linked one in /usr/bin. You can use one to set the permissions on the other.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Mark Grant
Honored Contributor

Re: I have Accidently removed file permission from chmod...

Not "/usr/sbin", it should be "/sbin"
Never preceed any demonstration with anything more predictive than "watch this"
Karthik S S
Honored Contributor

Re: I have Accidently removed file permission from chmod...

I simulated the problem that you are facing on my machine.

/usr/bin/chmod 000 /usr/bin/chmod
/usr/bin/chmod 555 /usr/bin/chmod
ll /usr/bin/chmod
-r-xr-xr-x 1 bin bin 24576 Nov 14 2000 chmod

It works without any problem.

Also in my machine there is chmod under /sbin.

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn