FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 08-26-2010, 12:16 PM
"Mike Burger"
 
Default ulimit error while changing max files to unlimited: PAM / sshd options?

> 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?

I don't believe that you can dynamically set a ulimit value that is higher
than the value currently in use...

> 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

PAM and ulimits are mutually exclusive...one does not affect the other.
In my experience, if you want to use unlimited ulimit settings, you need
to set them in the limits.conf file, and then start a new shell.

You can also set lower limits on a user by user basis by adding ulimit
commands to their .bash_profile files.

--
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email message to:

site-update-subscribe@bubbanfriends.org

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

Thread Tools




All times are GMT. The time now is 07:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org