Operating System - HP-UX
1748211 Members
4284 Online
108759 Solutions
New Discussion юеВ

Re: How can I restrict access to a file to only system processes

 
Edward Mugerwa
Occasional Advisor

How can I restrict access to a file to only system processes

Dear All;

I have a password file which I need to restrict to only system processes.

For example if a user issues more/vi/cat he should not get access. However, a background/cron Job process should.

All help welcome
Edward
7 REPLIES 7
Arunvijai_4
Honored Contributor

Re: How can I restrict access to a file to only system processes

Hi Edward, Do you mean to say that, particular shouldn't read the file and his cron or background job can read it ? Am i clear with your question ? Or only background process start by root can able to read this out ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Bharat Katkar
Honored Contributor

Re: How can I restrict access to a file to only system processes

Edward,
I think sudo utility may help you out.
Regards,

You need to know a lot to actually know how little you know
RAC_1
Honored Contributor

Re: How can I restrict access to a file to only system processes

Keep it owned by root:root and read perms for root only. This should do it.
There is no substitute to HARDWORK
Edward Mugerwa
Occasional Advisor

Re: How can I restrict access to a file to only system processes

Yes, I have a list of background process and only these should read from the file. No use should be able to read the contents of the file apart from root of course
Arunvijai_4
Honored Contributor

Re: How can I restrict access to a file to only system processes

Just change the ownership to root:root

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Edward Mugerwa
Occasional Advisor

Re: How can I restrict access to a file to only system processes

But the processes are not owned by root and shouldn't be owned by root. Two users own the background processes user1 and user2.

If I restrict access to root only will the cron jobs for these users have access to the processes.
Edward Mugerwa
Occasional Advisor

Re: How can I restrict access to a file to only system processes

correction!!
============
But the processes are not owned by root and shouldn't be owned by root. Two users own the background processes user1 and user2.

If I restrict FILE access to root only will the cron jobs for these users have access to the FILE.