groups and .htaccess?
Question posted by: Geoff Cox
(Guest)
on
August 8th, 2008 10:45 PM
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
8
Answers Posted
Using .htaccess and a linux server is it possible to give group access
Quote:
Originally Posted by
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
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
On Sat, 09 Aug 2008 08:32:36 +0100, Steve Swift
<Steve.J.Swift@gmail.comwrote:
Quote:
Originally Posted by
Quote:
Originally Posted by
>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
Quote:
Originally Posted by
>
>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.
Geoff Cox wrote:
Quote:
Originally Posted by
On Sat, 09 Aug 2008 08:32:36 +0100, Steve Swift
<Steve.J.Swift@gmail.comwrote:
>
Quote:
Originally Posted by
Quote:
Originally Posted by
>>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
>
>
Quote:
Originally Posted by
>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
http://edmullen.net
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
On Sat, 09 Aug 2008 15:00:41 -0400, Ed Mullen <ed@edmullen.netwrote:
Quote:
Originally Posted by
>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
On Sat, 09 Aug 2008 15:31:39 -0700, Michael Vilain
<vilain@NOspamcop.netwrote:
Quote:
Originally Posted by
>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
Geoff Cox wrote:
Quote:
Originally Posted by
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
Geoff Cox wrote:
Quote:
Originally Posted by
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
On Fri, 29 Aug 2008 17:11:03 -0500, Joe Beasley
<techjoe@joebeasley.orgwrote:
Quote:
Originally Posted by
>Geoff Cox wrote:
Quote:
Originally Posted by
>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
|
|
|
What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 196,996 network members.
Top Community Contributors
|