Quote:
It can be set (in seconds of CPU time) with: ulimit -t 123 However, this is more useful when added as a "watchdog" to a process that shouldn't take more than a certain amount of time. For example: Code:
# This should only run for 2 or three seconds |
Quote:
Code:
if[[ "$USER" == "houler" ]]; then ulimit -H hard -u 256, says something about and invalid argument, and it sets the user processing limit back to 1000+ when I leave it to 'ulimit -u 2', it works fine. |
Quote:
Quoteth the bash man page Quote:
|
Quote:
|
Better is to do it in slackware style, put those lines in a file like
/etc/profile.d/ulimit.sh chmod +x it |
Ok I did it, thanks.
|
A new problem arises with setting the ulimit after I make a chrooted ssh session:
Here's the story: Basically, the shell is a"chroot-shell" script, Here is the script: Code:
#!/bin/bash Code:
if [[ "$USER" == "root" ]]; then Any suggestion on how to circumvent this problem? |
Quote:
|
Quote:
Do you mean edit the script above, and somewhere along that script put down "sudo /bin/ulimits" where the 'ulimits' script will run Code:
if [[ "$USER" == "root" ]]; then Code:
#!/bin/bash Sorry just a bit baffled because of the amount of "gaps" in the knowledge I know about scripts |
More along the lines of:
Code:
... Code:
#!/bin/bash |
Actually I just realized that setting ulimit's for root is pointless because root can exceed even hard limits.
|
Quote:
A way around it that I just figured out: create a 'profile' file (or cp /etc/profile) and put it in /chroot-dir/etc/ and edit it and add Code:
# Ulimit settings for root |
All times are GMT -5. The time now is 12:10 PM. |