-   Red Hat (
-   -   Ftp access To Cgi-bin (

redhatlover 04-27-2004 05:25 PM

Ftp access To Cgi-bin

I create a cgi-bin directory inside myfolder


it's working fine

but how can I give a ftp access to this cgi-bin directory??

/home/myfolder >>> ftp access is working.

but home/myfolder/cgi-bin/ >>> ftp access is not working

please help me.

david_ross 04-28-2004 02:02 PM

Check that the user you are logging into ftp as has the correct privilages on the directory.

timtak 05-01-2004 11:33 PM

You have to give privelidges to both the user you are using to FTP with, and to apache, because it will be apache that executes the cgi's I think. I create a group containing apache and my ftp user and then give that group the required write and execute priveldges.

Here is what I did.

First of all find out what groups your username is a member of using

groups myusername

make a note of these "group1" "group2" etc. You may not be a member
of any groups. If not then ignore this stage.

Similarly find out which groups apache is a member of by using

groups apache

make a note of these too ("apachegroup1" etc.) Again, apache may not
be a member of any groups. If so, no problem.

Create group called "newgroup", say, using

groupadd -g 10000 newgroup

(I am not sure of the meaning of the -g and the 10000.)

put yourself into the new group using the following command

usermod -G newgroup,mygroup1,mygroup2 myusername

-G rewrites the list of groups so it is necessary to add
the names of the other groups that you are already a member too.

put apache into the new group using the following command
usermod -G newgroup,agroup1,agroup2 apache

Then move to the parent directory of your cgi-bin and html folders

cd /var/parent

change the owner ship (recursively) of all the files in the html folder
to be owned by the group "newgroup". In the post above I thought that
one used a colon. Sorry, it is a dot.

And you do not have to put a user before the dot. If there is no user
before the dot, then all members of the group are given ownership.
There is no need for a wild card in this case.

chown -R .newgroup html
(This means change ownership of folder or file html to group "newgroup" recursively, meaning that all the subfiles and folders will also be changed in the same way)

Again change the ownership of the cgi-bin to the same group.

chown -R .newgroup cgi-bin


redhatlover 05-04-2004 04:32 AM

thanks lot. I will be try

All times are GMT -5. The time now is 06:39 AM.