There is a common file which is accessed by both root and user.i want to change that file from user mode and that should not effect root and viceversa. how to do this in RHEL6?
sudo does the job for me .
Just prefix sudo before the command .For example to change access type
It sounds like you want different users to see different contents for the same file. This is not possible.
(It is possible to let different sets of processes see different contents for the same file. But this takes a lot of effort to set up.)
Many applications look for a configuration file in the user's home directory. This is the usual way to obtain different behavior for different users. Failing that, you might use environment variables or command line options.
If you're having trouble doing something, ask how to do it. Don't rush into some oddball solution and ask for help implementing it. You're suffering from the XY problem. Ask about your ultimate goal, not about a dubious intermediate step.