Re: Process Understanding

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

 



On 05Feb2007 10:28, Dan Track <dan.track@xxxxxxxxx> wrote:
| I'm trying to get my head round how processes start and how they get
| their environment, especially env variables.
| Let's say you have two scenarios, one where a user e.g www has the
| following entry in /etc/passwd
| 
| www:x:500:500::/home/www:/bin/bash
| 
| and the other where the user has the following entry:
| 
| apache:x:48:48:Apache:/var/www:/sbin/nologin
| 
| The main difference between the two that I would like to focus on is
| the that one user has a bash shell (www) while the other has no shell
| (apache).
| 
| If both users are used to start an httpd process, then where and how
| do the processess get their environment variables, i.e what files are
| read in both cases e.g /etc/profile, /etc/bashrc etc.?

Well first up, only "www" can "log in". At login time a shell will
source a bunch of files to set up its initial environment - its starts
with something very simple from the login command (which issues the
login prompt).

However, a web server startup is not a login shell. The web server is
simply invoked, typically from an init script. The login shell of the
user is not involved at all.

So there's not difference in the example you cite.
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

To be or not to be?    Not to be.
        - John Slater (Arnold Schwartzenegger),
          _Macbeth_ (_The_Last_Action_Hero_)

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux