Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I have six websites set up on my server, and I was wondering what the owners and groups should be set as for each site. For example, I have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    5

    Owners and Groups of websites on server


    Hi, I have six websites set up on my server, and I was wondering what the owners and groups should be set as for each site.

    For example, I have a site called 'Plants', and currently it says it's set as
    Owner: Plants
    Group: root

    Should the Group be 'Plants' too?

    I have another site called 'Gopher' and it says it's set as
    Owner: Gopher
    Group: apache

    Is that incorrect too?

    Many thanks.

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    What problem(s) are you having? Generally on Linux systems, Apache (are you using Apache?) files are kept in /var/www/html or /var/www/htdocs. The www should be apache:apache for owner:group and the sub-directories would depend upon who you want to have access. Not sure if this will help as you haven't defined a specific problem?

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    5
    Hi Yancek, I was just concerned that I might have set up the owners or groups incorrectly, or that they might be less secure. I am the only person who has access to the server.
    I have all the sites in the folders as follows:

    /home/plants/public_html
    /home/gopher/public_html

    so should I set the 'public_html' folder to apache:apache? (I am using Apache, by the way, should have said that in the beginning!)
    And then set 'plants' to plants : plants, for FTP?

    Sorry if this is a basic questions, is there a guide to owners and groups that you can recommend?
    Many thanks.
    Last edited by mosis; 06-07-2012 at 03:51 PM. Reason: Smiley appeared in the middle of plants : plants because of the colon and 'p'!

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I have directories/files in public_html on my machine which runs apache on a localhost. The owner group is the user, in your case assuming your username is actually mosis it would be probably: mosis:users. Some now use the user name for the group name and in that case it would be: mosis:mosis. The sub-directories and files are the same with regard to owner:group. If you had the files in /var/www... it would be different. You should have an httpd.conf file somewhere. On my system (which is not CentOS) it is in /etc/httpd/conf directory. To enable using public_html, you should check that you have this at the bottom of the file:
    <IfModule mod_userdir.c>
    UserDir public_html
    </IfModule>
    Below that you should have something on the line "allow from". On my local machine, I just have "allow from all" because it is not connected to the internet.

Posting Permissions

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