Operation not permitted

Ok, so I know this question has been asked before but nothing I do is working. This is my error.

“/usr/sbin/safe_asterisk: line 90: ulimit: open files: cannot modify limit: Operation not permitted”

I have disabled selinux, looked at ulimits “1024” and added “root hard and soft 4096/8096” to limits.conf.

I have found when i uncommit line 38 in safe_asterisk which is “maxfiles” this seems to remove the error… Though I feel like this isnt the solution.

Any help on this would be helpful.

btw this is a brand new install os os and asterisk.

8x cpu
24 gig memory.

If it helps any this is on a vm machine.

You are trying to run safe_asterisk non-root.

Im logged in as root