Re: Changing a file's UID from within an Apache module?

2000-12-03 Thread George Sanderson

Prior to creating any file, the user would have been authenticated and an
authorize module 
would have supplied the UID to be used for the request in an environment
variable.  The location 
of the user's files has to read by Apache so such that it can serve the
files (HTML).

The rational behind setting the UID of the files (and directories) is to
allow each user to be able 
to create files that are protected from other users who may also be
providing files.  Each users 
files are confined to certain sub-directory stubs.
 
Perhaps, I should use the GID instead of the PID to differentiate between
users and leave the PID alone.  Then perhaps setting the directory
permission to 0770 and 0460 for files on creation, along with checking the
GID of the files and dirs before any modifcation, could be used to achieve
the same effect.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Changing a file's UID from within an Apache module?

2000-12-01 Thread Jorge Godoy

On Wed, 29 Nov 2000, [EMAIL PROTECTED] wrote:
  
 Any ideas about the best way to change the permissions and UID?

Create an external minimum perl script with the SUID bit set and with
root as it's owner. Use this script to change the file
permissions. 


See you,
-- 
Godoy. [EMAIL PROTECTED]

Departamento de Publicações   Conectiva S.A.
Publishing Department Conectiva Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Changing a file's UID from within an Apache module?

2000-12-01 Thread Tim Tompkins

I'd put it someplace that is only accessible to the web user if you're going
to do that.


- Original Message -
From: "Jorge Godoy" [EMAIL PROTECTED]
To: "George Sanderson" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, December 01, 2000 5:22 AM
Subject: Re: Changing a file's UID from within an Apache module?


On Wed, 29 Nov 2000, [EMAIL PROTECTED] wrote:

 Any ideas about the best way to change the permissions and UID?

Create an external minimum perl script with the SUID bit set and with
root as it's owner. Use this script to change the file
permissions.


See you,
--
Godoy. [EMAIL PROTECTED]

Departamento de Publicações   Conectiva S.A.
Publishing Department Conectiva Inc.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Changing a file's UID from within an Apache module?

2000-11-29 Thread George Sanderson

I am creating a mod_perl Apache module.  The last functionality that I need
to implement is the ability to set the UID of the files and directories
which are created and modified by the Apache module to something other than
Apache's child UID.

For example, if when I built Apache 1.3.14 on Linux 2.2.17, I used:
APACI_ARGS=--server-uid=300,--server-gid=300
Later, my module creates a file "myfile.html".  I want to change the file's
UID from 300 to 3000, from within the Apache module.

I was going to set the file permissions to 750 and keep the Apache GID.
The directory permissions could be set to 770 in order to let the Apache
module create, modify, and delete files within the directories.  In this
way each file would provide exclusive (modify and create) access rights in
a shared user environment.
 
Any ideas about the best way to change the permissions and UID?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]