How to get around tar'ing up files you don't have permissions?
I would like to tar up some system logs with core files as a normal user through a script. However these core files are owned by root.
Of course I get "cannot read directory ...: Permission denied"
Is there a good way to grab these core files through a script? From searching around, I get that the best way is to modify the sudoers file, then run the script with sudo. Is this considered the safest and best way?