Linux.com

Home Linux Community Forums Linux System Administration Command Line/Scripting Making a file readable by a script alone but not by the user

Making a file readable by a script alone but not by the user

Link to this post 26 Jul 13

Hi,

I was wondering if anyone can help me in the following case.

I am writing a CLI application in perl where the non root user would ssh to a machine and run this application. This application reads a config file which contains usernames, passwords and DSN details of databas(es) to connect to. The user provides the name of the database as an argument to the application.

Basically, I would like this config file to be read by the application alone but not directly by the user using text readers like (e.g. more, less, vi etc).


Many thanks.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board