I have added 2 lines in
/etc/security/limits.conf
myuser soft nofile 16384
myuser hard nofile 16384
...which has no effect:
su -
sysctl -p
su myuser
ulimit -n
1024
It is important that this comes into effect without the user having to log in first, i.e. as root I start a script on his behalf.