Results 1 to 7 of 7

Thread: Systems Services - user?

  1. #1
    Join Date
    Jul 2009
    Posts
    34

    Default Systems Services - user?

    Hi,
    i was just wondering under which user accounts the services are executed.
    Or more specific: The apache2 service is running, which user I have to give the rights in the www directory?

    Thank
    P.S. Opensuse 11.1

  2. #2
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,443

    Default Re: Systems Services - user?

    None; users have rights to use a service; root has rights to change it. Don't give users rights to change a service,

  3. #3
    Join Date
    Jul 2009
    Posts
    34

    Default Re: Systems Services - user?

    Hi, thanks for your answer:
    It is not about changing a service it is about the files in the www directory the apache service can access.....

  4. #4
    Join Date
    Jun 2008
    Location
    /dev/swat
    Posts
    1,181

    Default Re: Systems Services - user?

    Normally i chmod it with 744, also can use for global access with 777. Also can change the user on specfic directory by chown command.

    Some examples:

    Code:
    chown username /var/www/project_1
    Code:
    chmod 774 /var/www/project_1
    You can read more about permissions.
    Linux permissions
    Linux[openSUSE, KDE], PHP, MySQL, Wordpress, Tech News, etc :
    http://anl4u.com

  5. #5
    Join Date
    Jul 2009
    Posts
    34

    Default Re: Systems Services - user?

    Thanks :-)...
    why question was exactly aiming at which value username should have in the chown example (for the apache2 running as a service..)

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Systems Services - user?

    Quote Originally Posted by js84 View Post
    Hi, thanks for your answer:
    It is not about changing a service it is about the files in the www directory the apache service can access.....
    It is in fact better for the files in /srv/www/htdocs to be owned by some other user than Apache (wwwrun), and for access to by Apache to be via world read (and search, for directories). This is so that in case there is some fault with the web app, it cannot overwrite files. The exceptions are areas where Apache must be able to upload files, e.g. photos, attachments. The web app installation procedure will mention such areas.

  7. #7
    Join Date
    Jul 2009
    Posts
    34

    Thumbs up Re: Systems Services - user?

    Thanks! That was what I was looking for!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •