Re: Changing permissions of ps command
From: Chris Mattern (syscjm_at_gwu.edu)
Date: 07/24/03
- Next message: Roedy Green: "Re: Count threads of a Java program"
- Previous message: rc_at_die@you@!spammers.sandworm.demon.co.uk: "DNS Problem"
- In reply to: Kishore: "Changing permissions of ps command"
- Next in thread: ragnus2003: "Re: Changing permissions of ps command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 24 Jul 2003 17:14:20 -0400
Kishore wrote:
> 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
permissions.
Chris Mattern
- Next message: Roedy Green: "Re: Count threads of a Java program"
- Previous message: rc_at_die@you@!spammers.sandworm.demon.co.uk: "DNS Problem"
- In reply to: Kishore: "Changing permissions of ps command"
- Next in thread: ragnus2003: "Re: Changing permissions of ps command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|