2

When i initially login to a server, I see the following error message.

ullimit: coredumpsize: Can't set limit (Operation not permitted)

Further, when I try to copy files into this machine, I see the same error,

cat .ssh/no_pass_rsa.pub | ssh user@server 'cat >> .ssh/authorized_keys'
user@server's password:
limit: coredumpsize: Can't set limit (Operation not permitted)

I read on a lot of blog posts that I must increase the hard limit and soft limit for the users. Trying the following command to check ulimit, gives the output as:

server> ulimit
ulimit: Command not found.

I could find no post where a user faced the issue of this operation not existing.

Also, I checked the limit and noticed that the coredumpsize is 0kbytes

$server> limit
cputime      unlimited
filesize     unlimited
datasize     unlimited
stacksize    33000 kbytes
coredumpsize 0 kbytes
memoryuse    unlimited
vmemoryuse   unlimited
descriptors  1048576
memorylocked 64 kbytes
maxproc      1030357
maxlocks     unlimited
maxsignal    1030357
maxmessage   819200
maxnice      0
maxrtprio    0
maxrttime    unlimited

How do I increase the coredump size or modify it to resolve this? Is there any other solution?

  • 1) What shell are you using? 2) Surely it's nothing called ullimit giving the error message, is it? 3) What are you actually trying to do? Save core dumps or something else? – ilkkachu Jul 7 '16 at 17:54
  • On the server where you received this message ulimit: Command not found, ulimit executable is not in your search path or someone deliberately deleted it. On the other end, where you get Can't set limit (Operation not permitted), the userid executing ulimit command, doesn't have the privilege to change that setting. They are two different issues. – MelBurslan Jul 7 '16 at 17:56
  • 1.Bash shell. 2. I am not sure what ullimit is. I thought I made a mistake and when I checked again the error actually contained the term "ullimit". Could not find any documentation regarding it as well. 3. I am trying to add myself as an authorized user on a server. So when I try to copy into this server, I face this issue. I have faced this before when I tried to copy files in and out of the server. Any idea as to what the issue maybe? – Meghna Natraj Jul 7 '16 at 18:07
  • @MelBurslan Thank you for the clarification. I realized that the 2 issues were due to completely different reasons and was able to fix them. I have posted the solution as well. – Meghna Natraj Jul 7 '16 at 19:38
  • @MeghnaNatraj ulimit is a builtin command in Bash, so it's highly unlikely it would not be available on Bash. The > ending your prompt and the fact that limit works, but ulimit doesn't pretty much hints that you are actually running (t)csh instead of Bash. Your root shell might be Bash, though. – ilkkachu Jul 8 '16 at 11:25
4

ulimit is a sh family (so bash, ksh etc) builtin. For csh family the command is limit. (zsh is complicated and allows both.)

Normal users can not raise their hard limits. Only root can do that. On a typical Linux machine this is done via pam_limits (e.g. in /etc/security/limits.conf and files in /etc/security/limits.d). These settings will take effect at login time (if using sshd then ensure usePam yes is set in sshd_config).

However users can lower their limits, so you might have a line in .login or /etc/csh.login or /etc/profile.d/* or similar that reduce the limit to zero, in which case that line will need removing.

-1

ulimit command not found - occurred as only the root user has the privileges to run this command and I was trying to execute it as a normal user. By running this as root, the command executed successfully.

Error Resolved - coredumpsize: Can't set limit (Operation not permitted) The issue was resolved by editing the /etc/security/limits.conf and modifying the lines for setting core limits (as root user)

File : /etc/security/limits.conf

Initially :

# End of file
##### Begin HR 424923 ######
*        soft        nofile        8192
*        hard        nofile        8192
##### End HR 424923  ########

# Limit core dumps
*       soft    core    0
*       hard    core    0

Finally :

# End of file
##### Begin HR 424923 ######
*        soft        nofile        8192
*        hard        nofile        8192
##### End HR 424923  ########

# Limit core dumps
*       soft    core    65535
*       hard    core    65535

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.