- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Unable to set ulimit for a user in Red Hat ES ...
Operating System - Linux
1752728
Members
5913
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 04:16 AM
тАО08-16-2010 04:16 AM
Hi,
I've set a nofiles hard limit in /etc/security/limits.conf this way:
* hard nofiles 8192
Then, I put the following setence in .bash_profile of user "carlos":
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
ulimit -n 8192
When I log as carlos from root (su - carlos) my user carlos sets the ulimit correctly as 8192 but when I log straight as carlos through SSH my user ends with nofiles ulimit as 1024, giving me the following error trying to execute the "ulimit -n 8192" line:
bash: ulimit: open files: cannot modify limit: Operation not permitted
Whats the point with this??? Im turning crazy.
I've set a nofiles hard limit in /etc/security/limits.conf this way:
* hard nofiles 8192
Then, I put the following setence in .bash_profile of user "carlos":
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
ulimit -n 8192
When I log as carlos from root (su - carlos) my user carlos sets the ulimit correctly as 8192 but when I log straight as carlos through SSH my user ends with nofiles ulimit as 1024, giving me the following error trying to execute the "ulimit -n 8192" line:
bash: ulimit: open files: cannot modify limit: Operation not permitted
Whats the point with this??? Im turning crazy.
Solved! Go to Solution.
- Tags:
- ulimit
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 04:43 AM
тАО08-16-2010 04:43 AM
Solution
Your SSH daemon has been started using the old ulimit values, so all child processes of sshd will inherit the old values.
Only root has the special privilege to increase a hard ulimit... and apparently the main sshd process gives up this privilege for security, so the old ulimit can be increased only if the new SSH session logs in as root.
After increasing the hard ulimit, restart the sshd daemon using a session that already has the new hard limit. (Rebooting the system would work too, but it's overkill...)
MK
Only root has the special privilege to increase a hard ulimit... and apparently the main sshd process gives up this privilege for security, so the old ulimit can be increased only if the new SSH session logs in as root.
After increasing the hard ulimit, restart the sshd daemon using a session that already has the new hard limit. (Rebooting the system would work too, but it's overkill...)
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2010 05:00 AM
тАО08-16-2010 05:00 AM
Re: Unable to set ulimit for a user in Red Hat ES 5.
Thanks so much, Matti! That worked :-).
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP