Orig followup question herewith:
Further to the contributions re malloc stopping news expiry the reported
fix of upping the datasize to unlimited and running expire manually is
fine. What we would like to do now is change the default shell or system
limits permanently.
As news.daily has to run as user "news" and only root has the authority to
issue an increase in the datasize limit I have not found a way of getting
the cron job which is run as news to have root raise the limit first.
Manually if you issue as root with yr shell as tcsh or csh
limit datasize unlimited
su news
news.daily expireover lowmark
then news inherits the increased datasize and runs. I have not been able
to wrap it so it both raises the limit and runs as su news undr cron.
The obvious way round this is to change the system or shell limits but I
have read every doc I can find and havent seen how to do this in 3.2c. I
understand that sysconfigtab can be used in 4 but not 3.2c.
Anybody know how to change these limits permanently please?
Answer is thanks to Sean O'Connell who persevered with suggestions until
it worked:
Wrapping the limit command as an ulimit -d within the cron line Thus:
su -c "(ulimit -d 104596; news.daily expireover lowmark)"
did NOT work as it inherited roots permissions and the expiry wrote files
as though they were roots; consequently the news server immediately died
as it had no access.
The correct solution is to create a crontab for news itself remembereing
to be news when you create it and to ensure it is owned by news. That
entry has no su component when it runs so the ulimit command can be added
to the script itself.
Stuart McKenzie
Received on Fri Oct 23 1998 - 09:55:51 NZDT