Skip to main content

Error running command as another user

Comments

4 comments

  • cPanelMichael
    Hello, Discussion on the manual modification of the settings that Shell Fork Bomb Protection enables is found at: The purpose of /etc/profile.d/limit.sh Otherwise, you'd need to disable Shell Fork Bomb Protection to prevent this from happening. Thank you.
    0
  • oscarenzo
    Thank you MIchael, I've edited the file of this way:
    #cPanel Added Limit Protections -- BEGIN #unlimit so we can run the whoami ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null LIMITUSER=$USER if [ -e "/usr/bin/whoami" ]; then LIMITUSER=`/usr/bin/whoami` fi #Custom Part for xymon exim queue check if [ "$LIMITUSER" == "xymon" ]; then ulimit -n 100 -u 70 -m 200000 -d 200000 -s 8192 -c 200000 -v unlimited 2>/dev/null elif [ "$LIMITUSER" != "root" ]; then ulimit -n 100 -u 35 -m 200000 -d 200000 -s 8192 -c 200000 -v unlimited 2>/dev/null else ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null fi #cPanel Added Limit Protections -- END
    But still showing the problem, need to edit the file limits.csh also?, then when run ulimit with this user have unlimited yet without do some modification:
    [root@xxx profile.d]# su xymon -c "ulimit -a" core file size (blocks, -c) 1000000 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 63398 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 4096 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 1024 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
    thank you.
    0
  • cPanelMichael
    But still showing the problem, need to edit the file limits.csh also?, then when run ulimit with this user have unlimited yet without do some modification:

    I have seen previous threads where users also needed to adjust the limits.csh file. Let us know if that helps. Thank you.
    0
  • GilbertoArias
    Hello, Discussion on the manual modification of the settings that Shell Fork Bomb Protection enables is found at: The purpose of /etc/profile.d/limit.sh Otherwise, you'd need to disable Shell Fork Bomb Protection to prevent this from happening. Thank you.

    EXCELLENT RECOMMENDATION, WORKS FOR ME ;-) I "disable Shell Fork Bomb Protection " just for a time in order to use Transfer tool.
    0

Please sign in to leave a comment.