473,800 Members | 2,227 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3469
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.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
Aug 9 '08 #5
On Sat, 09 Aug 2008 15:31:39 -0700, Michael Vilain
<vi****@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
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*****@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
Sep 2 '08 #9

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

Similar topics

1
7699
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... specifically, i can't enter the newly created directory with a username of test, and a password of test, which is what i am trying to do. also, i'm testing this script out on a remote server, and... after this script runs, i can't delete any of the...
8
50627
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 are still "on") <IfModule mod_php4.c> php_value upload_max_filesize 8M
4
2991
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 content, to a folder, requesting (html and php) files from that folder results in internal server error messages. If I upload an empty .htaccess file, all is fine. Then phpinfo() tells me I am using Apache/1.3.27.
7
7545
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 including the php.net manual. In the manual it said to include something like the following:
0
3721
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 and store it to a file, or block access all together. For example, anytime someone logs in, the .htaccess file should direct the user name and IP address to be stored in a log file through this cgi. A cron could be scheduled to determine if the...
4
10124
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
4900
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 which can override security features you've configured. Here's one way to do it. In the server configuration file, put
12
1854
by: Dave | last post by:
In PHP 4.4, what is the most secure server configuration while keeping REGISTER_GLOBALS on?
0
11290
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 /mywebpage), running Apache 1.3.33, and PHP 4.3.11. The goal is to use PHP to install an .htaccess file in a folder to forbid PHP files from being accessed from outside the server. I have a working .htaccess file in one folder, and I have been...
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10275
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.