Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Setting ulimit values in files on Redhat AS 2.1

Re: Setting ulimit values in files on Redhat AS 2.1

From: Steve <ThisOne_at_Aint.valid>
Date: Sat, 03 Jul 2004 20:26:53 +1200
Message-ID: <cc5qkd$vr2$1@lust.ihug.co.nz>


Scott Lurndal wrote:
> Steve <ThisOne_at_Aint.valid> writes:
>

>>Scott Lurndal wrote:
>>
>>>Steve <ThisOne_at_Aint.valid> writes:

>
>
>
>>>>Personally, I'd put them in /etc/profile. This is always run for all 
>>>>users, and with root privileges. That way, you can raise them up to the max.
>>>
>>>
>>>/etc/profile is executed in the context of the logged in user, not root. 
>>>You cannot raise the ulimit using /etc/profile, only lower it.
>>>
>>>
>>>scott
>>>
>>>
>>>
>>>>Steve
>>
>>I was about to deny 'hotly' this statement, but thought to check first. 
>>Glad I did! As you may have guessed, this used to be the way it was 
>>done, at least on commercial *nixes ( Solaris, HP-UX, DEC Ultrix ).

>
>
> Perhaps the *BSD based systems, but no System-V based system (SVR2,
> SVR3, SVR4, SVR4.2MP, SVR4/MK, Unixware or Solaris) has ever sourced
> /etc/profile as root[*]. The code that changes the UID to the new
> user is in login(1) and happens before the shell is invoked with
> the single "-" argument which tells the shell it needs to read
> /etc/profile.
>
> Remember that /etc/profile must be sourced in the context of the
> shell process itself, it cannot be executed stand-alone. To be able
> to source it with the effective UID == 0, one would have to invoke
> the shell with UID 0 and trust the shell to set the effective, real
> and saved UID's to the correct uid for the user after reading and
> processing /etc/profile. No shell has ever been trusted to do this.
>
> scott
>
> [*] unless of course, you log in as root.
But...

init execs /etc/profile which then execs the shell of your choice. That's why it's always run, irrespective of login shell, and was ( and I am certain of this! ), run as root.

Steve.
>
>

>>Either it has been changed, or Linux differs from the old System V in 
>>this way.
>>
>>It's always good to learn something new, even at the weekend!
>>
>>Cheers,
>>
>>Steve
Received on Sat Jul 03 2004 - 03:26:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US