Best practice is to do that sort of thing via the crontab if you can. You want to design the systems you administer to look after themselves as much as possible, and removing old temp files is something that ought to be possible to do automatically.
If you have to log in yourself every few days to manually clean up the temp files, then what happens if you want to take 2 weeks holiday. (Or you have an accident and spend 2 weeks in hospital. You have better things to do than to do manual tidying that the system ought to be able to do for itself.
For other things that cannot be done automatically, as design pattern I have frequently seen in the past is to have a web front end that interacts with the user and gets a list of what needs doing. The list is then written to disc or into a database. Another more privileged process running as a demon, or from the cron reads the database or files and does the work.
For example a couple of years ago I was working on a Corporate Intranet site. There was a web based tool for adjusting user accounts, group memberships and privileges. The web front end ran as a mod-perl process in the web server, and was sand-boxed for security reasons. Each user account change was written to an unprivileged database by the web front end. Another demon ran as root, read the queue of pending changes from the database and made the necessary changes to the Unix NIS and Windows Active directory servers.
In reply to Re: Unlinking Files and Taint Mode
by chrestomanci
in thread Unlinking Files and Taint Mode
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |