On 08-Dec-98 Kelvin Teh wrote:
> 
> I am using a standalone machine and I am the only one using the system
> (RH5.2)...how do i assign access rights to certain users to certain
> directories...
> Details: I am the only one using the system and am using another user
> instead of root to do my work...I set up the httpd and perl so that i can
> learn cgi programming on my local machine...but since the cgi-bin directory
> is read/write to root only i have to su everytime i want to update or
> modify the scripts in the directory...
> Is there any way that root can give user1 read/write access to the
> directory but not to all hte rights that root has?

To give a user write permission to the cgi-bin directory:

        chmod o+w cgi-bin

You probably don't want to do this with a multi-user system as it will allow
all user to create, modify or delete files in the cgi-bin directory.


Another solution would be to create a new directory within cgi-bin.

        cd cgi-bin
        mkdir user1
        chown user1 user1
        chgrp users user1

The permission for the directory cgi-bin/user1 should be drwxr-xr-x.

user1 will be able to write to files in the cgi-bin/user1 directory but not in
the cgi-bin directory. Other user will not be able to write or modify any of
the cgi scripts.

This solution is more acceptable for a multi-user system but should still be
avoided if you are concern about security. For maximum security, only root
should be allowed to create cgi-scripts.

I must admit that I don't have much experience with apache or web servers in
general so there may be better solution than this.

Cort
[EMAIL PROTECTED]

Reply via email to