ulimit problem

2005-01-04 Thread Dipl.-Ing. Martin Lorenz
Dear gurus on this list,

I use linux since kernel 0.93 and went through quite a lot of ups and
downs but this is something I simply don't understand:

for running vmware I needed to increase the limit for open files.
ok, ulimit -n is restricted for non-root. I could do a su , ulimit -n
and su back to my user account. that way it works...

but I wanted to make it nice and clean, so I activated pam_limits for
gdm, set the limit in limits.conf, tested it in a tty - everything fine.

BUT I spent three evenings with google, manuals and quite a lot of other
sources but still diden't succeed:

when loging in through gdm the file descriptor limit for my user is 256,
no matter what I do.

I allready found out, that it must have something to do with the login
option for the shell. don't ask me why.
here is how I found out:

## in a gnome-terminal:
[EMAIL PROTECTED] ~ ulimit -n
256
[EMAIL PROTECTED] ~ su -
Password:
[EMAIL PROTECTED]:~# ulimit -n
1021
[EMAIL PROTECTED]:~# su mlo
[EMAIL PROTECTED] /root ulimit -n
256
[EMAIL PROTECTED] /root exit
[EMAIL PROTECTED]:~# su - mlo
[EMAIL PROTECTED]:~$ ulimit -n
1021


can someone shed some light on this?

thanks
mlo
-- 
Dipl.-Ing. Martin Lorenz

They that can give up essential liberty 
to obtain a little temporary safety 
deserve neither liberty nor safety.
   Benjamin Franklin

Microsoft, I think, is fundamentally an evil company. 
 - JAMES H. CLARK 

*** NEW PUBLIC KEY ***
my gpg-key ID: F1AAD37D
http://blackhole.pca.dfn.de:11371/pks/lookup?op=getsearch=0xF1AAD37D

ICQ UIN: 33588107


signature.asc
Description: Digital signature


Re: ulimit problem

1996-11-26 Thread Philippe Troin

On Sat, 23 Nov 1996 00:36:14 +0800 Tan Wee Yeh ([EMAIL PROTECTED]
g) wrote:

 At least I understand how the prior case has only local
 effect and that the user is limited by the hard limts.
 
 Now... is there anyway to raise the hard limit globally.

Normally, limits are not set (ie they're set as the maximum 
available). If the limits are lower than normal:
1) either you have lshell installed, and there's a configuration file 
in etc which tells you which are the limits,
2) or one of the profile scripts (/etc/profile ~/.profile or 
/etc/csh.*) lowers the limit before the shell actually starts.

Check these.

Phil.





--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: ulimit problem

1996-11-26 Thread Tan Wee Yeh
 Normally, limits are not set (ie they're set as the maximum available). If 
 the limits are lower than normal:
 1) either you have lshell installed, and there's a configuration file in etc 
 which tells you which are the limits,

yep.. got it.. Thanks a lot.
That's my first encounter with lshell :)

Thanks again...



Just me,
Wire ...



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: ulimit problem

1996-11-24 Thread Philippe Troin

On Sat, 23 Nov 1996 12:13:54 +0800 Tan Wee Yeh ([EMAIL PROTECTED]
) wrote:

  On Sat, 23 Nov 1996 11:17:22 +0800 Phil wrote:
  Anyone can lower and raise the soft limits, as long as they remain under 
  the hard limit. Can you be more precise with your problem ?
  
 I have tried to first raise the hard-limit as root then 
 the soft-limit as the user after root logouts without
 success.
 
 Same message
 ulimit: cannot raise limit: Operation not permitted
 is persistent.
 
 Just found that I can raise the ulimit for the user if I 
 switch-user from root who has already raised the hard-limit.
 
 Is there anyway to raise the hard-limit permanently...
 That seems to be the problem now.

Perfectly normal :-)

By doing the above you change the limits for root's shell, not the 
user shell. There is no way of raising the hard limits for a user 
except root.

Phil.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: ulimit problem

1996-11-23 Thread Philippe Troin

On Fri, 22 Nov 1996 16:04:22 +0800 Tan Wee Yeh ([EMAIL PROTECTED]
) wrote:

 Hi,
 
 I'm trying to raise the ulimit as an ordinary user.
 I don't seem to be able to raise any limit above some
 ceiling, except when I'm root.

 Anyone knows how I can raise the limits?
 It doesn't seem to be the problem with Hard/Soft
 limits but more like priviledges...

From your example, you were trying to raise a hard limit.
Only root can raise hard limits.
All users and lower and raise soft limits, but constrained by the hard limit.
Try using [u]limit without the -H option, it will take soft limits by default.

Phil.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


Re: ulimit problem

1996-11-23 Thread Philippe Troin

On Sat, 23 Nov 1996 11:17:22 +0800 Tan Wee Yeh ([EMAIL PROTECTED]
) wrote:

  On Fri, 22 Nov 1996 16:04:22 +0800 Tan Wee Yeh ([EMAIL PROTECTED]
  ) wrote:
   Anyone knows how I can raise the limits?
   It doesn't seem to be the problem with Hard/Soft
   limits but more like priviledges...
  
  From your example, you were trying to raise a hard limit.
  Only root can raise hard limits.
  All users and lower and raise soft limits, but constrained by the hard 
  limit.
  Try using [u]limit without the -H option, it will take soft limits by 
  default.
  
 The hardlimit part is ok.. I just want to raise the limits
 for the normal user... 

Anyone can lower and raise the soft limits, as long as they remain 
under the hard limit. Can you be more precise with your problem ?

Phil.





--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]


ulimit problem

1996-11-22 Thread Tan Wee Yeh
Hi,

I'm trying to raise the ulimit as an ordinary user.
I don't seem to be able to raise any limit above some
ceiling, except when I'm root.


bash$ ulimit -a
  ...
cpu time (seconds)   3600
  ...

bash$ ulimit -t 3601
ulimit: cannot raise limit: Operation not permitted

bash$ ulimit -t unlimited
bash$ ulimit -a
  ...
cpu time (seconds)   3600
  ...

bash$ ulimit -Ht unlimited
ulimit: cannot raise limit: Operation not permitted


Anyone knows how I can raise the limits?
It doesn't seem to be the problem with Hard/Soft
limits but more like priviledges...



Just me,
Wire ...


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]