How to PERMANTLY CHMOD exim_mainlog?
My platform has a log viewer for important server log files like the exim_mainlog log. Unfortunately and for reasons I can only pointlessly speculate about, the CHMOD for exim_mainlog keeps changing from 644 to 640!
How do I permanently CHMOD the exim_mainlog file so I don't have to keep reconnecting to my FTP and manually set it every single time I want to check the log in my platform?
-
Hey hey! I don't believe this is possible through normal means - anytime cPanel does the nightly update it'll reset that file permission.
Your best option is likely to add a one-line command to /scripts/postupcp so the permissions are reset to what you want after the nightly update.
0 -
Hi Rex!
Thank you for taking the time to respond! It looks like the postupcp file specific to cPanel? I can only presume that by suggesting this that the file will not itself be overridden or merely appended to in the future?
I was initially thinking of a batch file (file.sh for Linux) though it's just this one command, for now.
I was successful in testing this in the terminal. I'm pretty sure that a large portion of people writing tutorials want people to hate Linux. I did find someone who actually made a tutorial including the basic numbers though; advanced stuff is great but is pointless if the basics aren't covered!
chmod 644 /var/log/exim_mainlog #Enable PHP read permissions for mail log.I added that line to the bottom of the
/scripts/postupcpfile.Besides my question about the file itself being updated I'm open to any other suggestions or thoughts. Thank you Rex!
0 -
upcp (Update cPanel) is indeed specific to cPanel. It's a daily cron that updates cPanel software as well as applies any OS updates via the OS's package manager. The postupcp file should not be override as that's the documented place where things need to be added that run with upcp finishes.
0 -
Instead of changing exim_mainlog permissions, you could add the user to the mail group
usermod -a -G mail [user-name]
0 -
Thanks for the suggestions guys...
upcp (Update cPanel) is indeed specific to cPanel. It's a daily cron that updates cPanel software as well as applies any OS updates via the OS's package manager.
Great, I've got updates disabled because after a forced migration a year ago the updates obliterated a full month of my life! So I can't do that until I can afford to run a second server to test the dumbs*** updates that come through for the OS and cPanel.
Instead of changing exim_mainlog permissions, you could add the user to the mail group
usermod -a -G mail [user-name]
I tried that and no dice, interesting suggestion though. Unless it requires a server reboot? Though I'd imagine permissions changes should instantly work.
0 -
Permission changes work instantly, but if you do that usermod change you must start a new session.
0
Please sign in to leave a comment.
Comments
6 comments