groups and .htaccess?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff Cox

    groups and .htaccess?

    Hello,

    Using .htaccess and a linux server is it possible to give group access
    to a person so that he/she can access files in several different
    folders?

    If yes, how is this done?!

    Cheers

    Geoff
  • Steve Swift

    #2
    Re: groups and .htaccess?

    Using .htaccess and a linux server is it possible to give group access
    to a person so that he/she can access files in several different
    folders?
    ..htaccess covers the folder it is in, and any subfolders, so (until
    overridden) it gives access to a whole subtree.

    Other than that, you have to put one .htaccess in each folder.

    If they are identical between different folders (and will remain so)
    then you can duplicate them using links. I'd use hard links (providing
    the folders are in the same filesystem) but symbolic links *might* work.
    Try it before going too far though. I can imagine the Apache developers
    being a bit twitchy about following symbolic links for a file which
    controls access/security.

    One advantage of using linked files is that you could also include a
    link in one of your own directories, with a meaningful name such as
    "Group htaccess file"; then you would edit your own file, and the server
    would get updated.

    Incidentally, for Windows users, the ability to create links to files
    also exists in the NTFS filesystem, it is just not widely exposed. You
    can use a package "NTFS Link" to make the process a lot easier.

    --
    Steve Swift


    Comment

    • Geoff Cox

      #3
      Re: groups and .htaccess?

      On Sat, 09 Aug 2008 08:32:36 +0100, Steve Swift
      <Steve.J.Swift@ gmail.comwrote:
      >Using .htaccess and a linux server is it possible to give group access
      >to a person so that he/she can access files in several different
      >folders?
      >
      >.htaccess covers the folder it is in, and any subfolders, so (until
      >overridden) it gives access to a whole subtree.
      >
      >Other than that, you have to put one .htaccess in each folder.
      >
      >If they are identical between different folders (and will remain so)
      >then you can duplicate them using links. I'd use hard links (providing
      >the folders are in the same filesystem) but symbolic links *might* work.
      >Try it before going too far though. I can imagine the Apache developers
      >being a bit twitchy about following symbolic links for a file which
      >controls access/security.
      Steve,

      'afraid you've lost me! I wish to allow a user to access files in say
      folder A, B and E but not those in C and D.

      Is there an easy way of doing this? T thought I had read somewhere
      about group access which I assumed meant that I could have A, B and E
      access in say group X and C and D access in group Y. Then I could
      assign this user to X.

      Cheers

      Geoff

      >
      >One advantage of using linked files is that you could also include a
      >link in one of your own directories, with a meaningful name such as
      >"Group htaccess file"; then you would edit your own file, and the server
      >would get updated.
      >
      >Incidentally , for Windows users, the ability to create links to files
      >also exists in the NTFS filesystem, it is just not widely exposed. You
      >can use a package "NTFS Link" to make the process a lot easier.

      Comment

      • Ed Mullen

        #4
        Re: groups and .htaccess?

        Geoff Cox wrote:
        On Sat, 09 Aug 2008 08:32:36 +0100, Steve Swift
        <Steve.J.Swift@ gmail.comwrote:
        >
        >>Using .htaccess and a linux server is it possible to give group access
        >>to a person so that he/she can access files in several different
        >>folders?
        >.htaccess covers the folder it is in, and any subfolders, so (until
        >overridden) it gives access to a whole subtree.
        >>
        >Other than that, you have to put one .htaccess in each folder.
        >>
        >If they are identical between different folders (and will remain so)
        >then you can duplicate them using links. I'd use hard links (providing
        >the folders are in the same filesystem) but symbolic links *might* work.
        >Try it before going too far though. I can imagine the Apache developers
        >being a bit twitchy about following symbolic links for a file which
        >controls access/security.
        >
        Steve,
        >
        'afraid you've lost me! I wish to allow a user to access files in say
        folder A, B and E but not those in C and D.
        >
        Is there an easy way of doing this? T thought I had read somewhere
        about group access which I assumed meant that I could have A, B and E
        access in say group X and C and D access in group Y. Then I could
        assign this user to X.
        >
        Cheers
        >
        Geoff
        >
        >
        >One advantage of using linked files is that you could also include a
        >link in one of your own directories, with a meaningful name such as
        >"Group htaccess file"; then you would edit your own file, and the server
        >would get updated.
        >>
        >Incidentally , for Windows users, the ability to create links to files
        >also exists in the NTFS filesystem, it is just not widely exposed. You
        >can use a package "NTFS Link" to make the process a lot easier.
        If you want ALL users to have access to A, B and C folders, simply do
        NOT password protect them.

        If you want (additionally) SOME users to have access to folders D and E,
        password protect only those folders.

        If the users are in sets and only some sets of users can access some
        folders:

        SET-1 - access D only (give password to D only)
        SET-3 - access E only (give password to E only)
        SET-2 - access D and E (give both passwords)

        Am I understanding you correctly? Will this handle what you want to do?


        --
        Ed Mullen
        Help for Mozilla, Firefox and SeaMonkey. Performances and original music.

        There is one thing I would break up over and that is if she caught me
        with another woman. I wouldn't stand for that. - Steve Martin

        Comment

        • Geoff Cox

          #5
          Re: groups and .htaccess?

          On Sat, 09 Aug 2008 15:00:41 -0400, Ed Mullen <ed@edmullen.ne twrote:

          >If you want ALL users to have access to A, B and C folders, simply do
          >NOT password protect them.
          >
          >If you want (additionally) SOME users to have access to folders D and E,
          >password protect only those folders.
          >
          >If the users are in sets and only some sets of users can access some
          >folders:
          >
          >SET-1 - access D only (give password to D only)
          >SET-3 - access E only (give password to E only)
          >SET-2 - access D and E (give both passwords)
          >
          >Am I understanding you correctly? Will this handle what you want to do?
          Ed,

          Not quite - I want to be able to allow user Fred to access say A and
          D, user Jane to access C, D and E etc.

          How to od this?

          Cheers

          Geoff

          Comment

          • Geoff Cox

            #6
            Re: groups and .htaccess?

            On Sat, 09 Aug 2008 15:31:39 -0700, Michael Vilain
            <vilain@NOspamc op.netwrote:
            >Access to web pages is based on putting a password on a folder that
            >contains the web pages. If the software is "serving" the web pages
            >you've created is called Apache (ask your ISP), you can setup access to
            >those pages according to the following:
            >
            >- individual users that have to login and provide a username and password
            >- groups of users can have access to pages based on being part of group
            >
            >So you have a password file which has users fred and jane in it and a
            >group file containing three groups:
            >
            >set1: fred
            >set2: fred jane
            >set3: jane
            >
            >The web page A is in a folder with a .htaccess file that requires
            >membership in group set1.
            >
            >The web pages C and E are in a folder with a .htaccess file that requires
            >membership in set3.
            >
            >The web page D is in a folder with a .htaccess file that requires
            >membership in group set2.
            >
            >The bits and bolts of how are here:
            >
            >http://httpd.apache.org/docs/1.3/howto/auth.html
            >
            >If this is more than you can cope with, hire a web-savy person to set it
            >up for you. Or Read The Fine Manual.
            Many thanks Michael - I will check with the hosting people and try out
            what you suggest.

            Cheers

            Geoff

            Comment

            • Joe Beasley

              #7
              Re: groups and .htaccess?

              Geoff Cox wrote:
              Hello,
              >
              Using .htaccess and a linux server is it possible to give group access
              to a person so that he/she can access files in several different
              folders?
              >
              If yes, how is this done?!
              >
              Cheers
              >
              Geoff
              Found the following. Basically you create a user and group file and tell
              apache to Require the group.


              Comment

              • Joe Beasley

                #8
                Re: groups and .htaccess?

                Geoff Cox wrote:
                Hello,
                >
                Using .htaccess and a linux server is it possible to give group access
                to a person so that he/she can access files in several different
                folders?
                >
                If yes, how is this done?!
                >
                Cheers
                >
                Geoff
                Found the following. Basically you create a user and group file and tell
                apache to Require the group.


                Comment

                • Geoff Cox

                  #9
                  Re: groups and .htaccess?

                  On Fri, 29 Aug 2008 17:11:03 -0500, Joe Beasley
                  <techjoe@joebea sley.orgwrote:
                  >Geoff Cox wrote:
                  >Hello,
                  >>
                  >Using .htaccess and a linux server is it possible to give group access
                  >to a person so that he/she can access files in several different
                  >folders?
                  >>
                  >If yes, how is this done?!
                  >>
                  >Cheers
                  >>
                  >Geoff
                  >
                  >Found the following. Basically you create a user and group file and tell
                  >apache to Require the group.
                  >
                  >http://httpd.apache.org/docs/2.2/howto/auth.html
                  thanks Joe - sorry for slow response.

                  Cheers

                  Geoff

                  Comment

                  Working...