Re: owner of dir/files

From: Jean-Baptiste Quenot (jb.quenot_at_caraldi.com)
Date: 11/11/03

  • Next message: Jean-Baptiste Quenot: "Re: What should i do?"
    Date: Tue, 11 Nov 2003 20:10:31 +0100
    To: freebsd-questions@freebsd.org
    
    

    * M.D. DeWar:

    > I just noticed that when I d/led a program and un-tarred it and set it
    > up that the directory in the apache web root has as owner something
    > like 501:www . I also noticed some others that were mysql:mysql or
    > 500:100 for the user/group.
    >
    > I am not sure what happens if left that way. Since there is no
    > user/group for those does it mean the files won't run or be served ?

    Whether the files will be served or not depends on the file mode, not
    the file owner. Apache runs as user www, so www must be able to read
    those files. When files have mode 644 and dirs 755, it is always
    possible to serve a website, whatever the owner (user/group) is.

    > In my web root should all directories and files be nobody:nobody ?

    The files and directories should be owned by their actual author, to be
    able to change them.

    > what if some are root:wheel ?

    Then only root will be able to gain the user mode, and only users in the
    wheel group will be able to gain the group mode. For example if the
    mode is 640, root can write to the file, and users in wheel can read the
    file. But Apache won't be able to read it.

    See chmod(1) for more details.

    Cheers,

    -- 
    Jean-Baptiste Quenot
    http://caraldi.com/jbq/
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Jean-Baptiste Quenot: "Re: What should i do?"