It seems that new log files created on UNIX systems (specifically AIX and Linux) are being created with root only permissions. I need to enable other users to have access to read these files. Any suggestions?
I’ve tried issuing a chmod -R, but new files are created with root only permissions.
The result would be the same if I ran the command from a task for the terminal. The issue is that the new log files are created with the root only permission. chmod only changes the permissions for existing files.
I don’t want to create a task that runs everyday and change the permissions on new files, I’m looking for a better way.
Sorry, I misread that. I read the “I tried” to mean it wasn’t working, but I get it now… It works, it just is not a good solution to the problem.
What if you change the permissions / owner of the log folder rather than the files themselves. Does that do anything useful when new files are created?
Is root the owner of the folder? Does the same thing happen if you use
chown
to change the ownership / group of the folder?
I’m just guessing that new files inherit their permissions from the folder they are created in, but I’m not sure what needs changed.
Otherwise the permissions are being set based upon the BESClient process directly, or based upon it running as root, in which case I don’t think anything can fix it.
It seems that the bes client is creating the files with that permission, they are not inheriting from the parent folder. I can’t imaging changing the owner of the directory would make a difference.
I’m trying to enable IEM users the ability to troubleshoot various issues, they would generally have access to the console or an API interface. They will have access to terminal into the UNIX computers as a user, without root access. I could create a task they could run, but I would like to keep things as simple as possible for them and aviod extra steps if I can…
I’m not sure that changing the group or owner of the parent folder would really do anything, but I think it is worth a try, otherwise I don’t really see a solution other than a task that detects when a new log has root only permissions and changes it. I think the overhead of a policy action like that would be minimal, but definitely not ideal.
Here is what I found will work. I hope this might be helpful to someone in the future…
I can modify the besclient startup file “/etc/rc.d/init.d/besclient” and change the umask from 077 to 022. This will instruct besclient to create new files with the following permissions -rwxr-xr-x. Below is what that section of the file looks like.
limit access to client created files
umask 077
Then I still need to change access to the Log folder directory to allow others to open it. I can issue chmod to handle that: