As normaluser:
normaluser
$ ulimit -n 4096 -bash: ulimit: open files: cannot modify limit: Operation not permitted
As root it works as
To change file descriptor limit as normal user before running any applicaiton.
I use this small utility fdlimit which will increase file descriptor limit using "setrlimit()" system call before executing any program.
I use it like this
$ sudo ./fdlimit