Re: Changing permissions of ps command
From: Chris Mattern (syscjm_at_gwu.edu)
Date: Thu, 24 Jul 2003 17:14:20 -0400
> Hi All,
> I have a problem here, i had tried to change the prmissions of command
> ps to 777 from 555.
Er, why? You *don't* want J. Average User rewriting your system
commands. Trust me on this.
> But the permissions of few other files are getting
> changed. I had noticed that all these files are hard links and their
> inode is same.
That is correct. Permissions are kept in the inode, not the pathname.
All pathnames that are hardlinked to the same inode have the same
permissions; change one, and you change them all.
> Probably because of this it is creating the problem.
It's not a "problem". It is simply how the Unix filesystem works.
> But, the output of each program is different.
That's because the code looks at what command name was used to
invoke it and changes its behavior based on how you called it.
> Anyways, how do i set permission for only this files. Your suggestions
> will be highly Appreciated.
You don't. You have several pathnames that point to the same inode
(file). There is only one file which has several filenames. Since
permissions are kept in the inode and not the pathname, it is
physically impossible to make the different pathnames have different