Re: ulimit error while changing max files to unlimited: PAM / sshd options?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, ulimit only lets you set a number up to the hard
limit that is set for your shell.  Both hard and soft
limits are set to 1024 by default unless the limits.conf
file has been configured _before_ the shell is started.

I know this works with numbers, since I set hard and
soft limits to 10240 for select users.  Try using a
number less than the total for the system instead of
unlimited.

c


Rahul Nabar wrote:
> I tried changing the max limit on the number of open files but get an
> error:
>
> ssh root@eu033
> [root@eu033 ~]# ulimit -n unlimited
> -bash: ulimit: open files: cannot modify limit: Operation not permitted
>
> I verified that /etc/security/limits.conf has these two lines:
> *               hard    nofile          unlimited
> *               soft    nofile          unlimited
>
> The default kernel limits seem high enough:
> [root@eu033 ~]# cat /proc/sys/fs/file-max
> 1585781
>
> [root@eu033 ~]# sysctl -a|grep fs.file-max
> fs.file-max = 1585781
>
> So why is my change via ulimit being rejected? What else could be
> setting the limit at 1024. Any ideas how else I can get the file-limit
> to be set to unlimited?
>
> Actually, I am not even sure limits.conf is being used since I have
> the following lines in the file /etc/ssh/sshd_config
>
> UsePAM no
> UsePrivilegeSeparation no
>
> --
> Rahul
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux