473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Aug 8 '08 #1
8 3446
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
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk
Aug 9 '08 #2
On Sat, 09 Aug 2008 08:32:36 +0100, Steve Swift
<St***********@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.
Aug 9 '08 #3
Geoff Cox wrote:
On Sat, 09 Aug 2008 08:32:36 +0100, Steve Swift
<St***********@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
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
Aug 9 '08 #4
On Sat, 09 Aug 2008 15:00:41 -0400, Ed Mullen <ed@edmullen.netwrote:

>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
Aug 9 '08 #5
On Sat, 09 Aug 2008 15:31:39 -0700, Michael Vilain
<vi****@NOspamcop.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
Aug 10 '08 #6
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
Aug 29 '08 #7
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
Aug 29 '08 #8
On Fri, 29 Aug 2008 17:11:03 -0500, Joe Beasley
<te*****@joebeasley.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
Sep 2 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: yawnmoth | last post by:
i'm trying to write a php script that will password protect some random directory by creating a .htaccess file, and a password file to accompany the .htaccess file, and it isn't working... ...
8
by: Joshua Beall | last post by:
Hi All, How do I disable magic quotes via .htaccess? I put the following file in my webroot, but it does not disable magic_quotes_gpc (according to phpinfo(), both the local and master value...
4
by: Ivo | last post by:
Greetings newsgroup, I am moving some php scripts to a new host. While getting to know the server, I ran into a strange problem. If I add a .htaccess file, or more specifically: a .htaccess with...
7
by: John | last post by:
Hello. I want to get this blasted .htaccess file sorted out, so I can have sessions without register_globals being on. I have looked everywhere for info on this and I mean everywhere...
0
by: Stoco | last post by:
I am trying to create a generic interface that will manage various ..htaccess protected directories. In the ideal world, the .htaccess would trigger a cgi script that would take login information...
4
by: Bill | last post by:
Does ASP have a file whose function is similar to .htaccess on Apache? I'm looking to protect subdirectory content.
1
by: nickyeng | last post by:
I have checked this info from apache website, and i confused with it. Procteing System files it said: To run a really tight ship, you'll want to stop users from setting up .htaccess files...
12
by: Dave | last post by:
In PHP 4.4, what is the most secure server configuration while keeping REGISTER_GLOBALS on?
0
by: asherwolf | last post by:
Hi, I'm trying to do something I think is pretty neat, but I've just about pulled my hair out by the behavior of my server. I'm hosting on GoDaddy, using a subdomain (www.mywebpage.com maps to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.