LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-27-2004, 05:25 PM   #1
redhatlover
LQ Newbie
 
Registered: Apr 2004
Posts: 27

Rep: Reputation: 15
Ftp access To Cgi-bin


hi,

I create a cgi-bin directory inside myfolder

/home/myfolder/cgi-bin

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.
 
Old 04-28-2004, 02:02 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Check that the user you are logging into ftp as has the correct privilages on the directory.
 
Old 05-01-2004, 11:33 PM   #3
timtak
LQ Newbie
 
Registered: Jan 2004
Posts: 22

Rep: Reputation: 0
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

Presto.
 
Old 05-04-2004, 04:32 AM   #4
redhatlover
LQ Newbie
 
Registered: Apr 2004
Posts: 27

Original Poster
Rep: Reputation: 15
cgi-bin

thanks lot. I will be try
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not access cgi-bin from browser. Spreegem Linux - Software 6 11-07-2005 07:22 PM
Cannot access cgi-bin directory for Nagios hywaydave23 Linux - Software 1 10-12-2005 06:16 AM
How do i access the files in my CGI-BIN rhuser Linux - Software 2 03-04-2003 03:33 PM
no access to cgi-bin within Apache Mackeral Linux - Software 6 05-14-2002 05:15 AM
no access to cgi-bin j-ray Linux - General 0 04-01-2002 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration