LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-03-2006, 02:46 PM   #1
AmigaSpirit
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Rep: Reputation: 0
Apache works, now i want FTP


Apache works fine, and now i wanna be able to from any other computer connect and upload what ever files i wanna to my web server, but i looked almost everywhere but as a noob i am i cant find it...

Plz help me.. i use Slackware 10.1
 
Old 01-03-2006, 03:13 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
A full install of Slackware comes with vsftp. If you didn't do a full install, you can get the package from your favorite mirror.
 
Old 01-03-2006, 03:15 PM   #3
AmigaSpirit
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
i did a full install but i dont find vsftp ?!
it installed 3gb i think

Did u mean vsftpd ?? i have it but how to config it ???
 
Old 01-03-2006, 05:19 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Yes, vsftpd is the program you need to run. Slackware is set up to run it through inetd, and you can check that this is the case by looking at your /etc/inetd.conf file. The ftp line for vsftpd should be uncommented.

You configure vsftpd itself using the /etc/vsftpd.conf file. Be sure to read through the man page as well (man vsftpd.conf) for an explanation of the things you can configure. If you have any specific questions, post them.
 
Old 01-03-2006, 05:26 PM   #5
AmigaSpirit
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
anything special that i need to think about to be able to manage the web pages i want on my server ???

I get some strange error mess:

500 OOPS: could not bind listening IPv4 socket

if i comment out the line in /etc/inetd.conf

#ftp stream tcp nowait root /usr/sbin/tcpd vsftpd

and start it manual from # vsftpd vsftpd.conf it works, but i want it to start when i boot and run in the background at all times..
It seems like i have missed something here but i dont know what..

Last edited by AmigaSpirit; 01-03-2006 at 07:43 PM.
 
Old 01-03-2006, 08:11 PM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Hm. That sounds to me like a problem with inetd, not vsftpd. You might want to check that inetd is running. In /etc/rc.d the rc.inetd file should be executable and if you run lsof -i you should see that inetd is the command running ftp.

Since all inetd is doing is running vsftpd on demand, you could not use it and just leave vsftpd running all the time. You could easily start it on boot by putting the appropriate command in /etc/rc.d/rc.local.

The other thing to check is that if you are running vsftpd from inetd, you need to make sure the listen=YES line in vsftpd.conf is commented out. If it isn't commented out and inetd is running vsftpd, some odd things may happen.
 
Old 01-03-2006, 08:47 PM   #7
AmigaSpirit
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
i got another problem also, when i upload files to my web server the files are seen but not available to view or use. i dont know what i shall do or search for.. i dont wanna use putty and ftp command to get files in to the web and be able to use em... what am i doing wrong here ?!

Thx man i got it running from inetd now.. But still i dont know how to upload stuff to it and get the pictures and files working on my web page without manually changing the attributes....
how do i do that ???

Last edited by AmigaSpirit; 01-03-2006 at 10:21 PM.
 
Old 01-04-2006, 02:02 AM   #8
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Sounds to me that the file permissions are wrong when you upload a file.
This can be caused by:
-your vsftpd.conf (and ftpaccess) configuration settings
-a wrong umask value

In ftp, after you've used "put" or "mput" to upload your files, do a listing with "dir" or "ls" and
post the output of that command. That may give me a clue on what's going wrong.

One possible "quick and dirty" solution would be to execute a "chmod" operation in ftp just after the upload.
Be careful though when changing file permissions though. They contribute significantly to your website's overall security.
 
Old 01-04-2006, 06:53 AM   #9
AmigaSpirit
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
i use flashfxp to connect and when i make a dir it gets drwx------ flags not drwxr-xr-x as the other dirs this i have to change manually with attributes (CHMOD) in flashfxp..
I dont know how to make it set the flags right from the begining...
 
Old 01-04-2006, 07:17 AM   #10
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
The way I've handled this is to create a real user/group (www:www) that both runs Apache and owns the directory for the web file. When I need to transfer files, I ftp in as www and the files are saved with the proper permissions. By default, Slackware uses the nobody:noone user and group to run Apache, but since the nobody user isn't a fully qualified user, you can't log in via ftp as nobody. So you either need to create a fully qualified user that can log in, or you just need to remember to change file permissions after you upload.

Quote:
drwx------
That actually isn't a bad thing. Basically only your Apache user is allowed to do anything to the files. Group members and everyone aren't allowed to do anything.
 
Old 01-04-2006, 07:27 AM   #11
AmigaSpirit
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Hangdog42
The way I've handled this is to create a real user/group (www:www) that both runs Apache and owns the directory for the web file. When I need to transfer files, I ftp in as www and the files are saved with the proper permissions. By default, Slackware uses the nobody:noone user and group to run Apache, but since the nobody user isn't a fully qualified user, you can't log in via ftp as nobody. So you either need to create a fully qualified user that can log in, or you just need to remember to change file permissions after you upload.



That actually isn't a bad thing. Basically only your Apache user is allowed to do anything to the files. Group members and everyone aren't allowed to do anything.

Ok so how do i do that ?? with apache i mean, think about the topic in this forum now... i installed linux 2 times only, and knows so little...
 
Old 01-04-2006, 10:38 AM   #12
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Well, to create the user, you need to use the useradd command and the group with the groupadd command. Once that user and group exists, you then need to change ownership of the web files to that user/group with chown. When you create the user you also either have to make your web pages directory the users home directory or you can put a link in the new users home directory pointing to the web pages directory. You could also move your web pages to the users home.

Finally, you need to edit your httdp.conf file to reflect the new user Apache should run under and to point to the new web pages location if you changed it.
 
Old 01-04-2006, 02:16 PM   #13
AmigaSpirit
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Hangdog42
Well, to create the user, you need to use the useradd command and the group with the groupadd command. Once that user and group exists, you then need to change ownership of the web files to that user/group with chown. When you create the user you also either have to make your web pages directory the users home directory or you can put a link in the new users home directory pointing to the web pages directory. You could also move your web pages to the users home.

Finally, you need to edit your httdp.conf file to reflect the new user Apache should run under and to point to the new web pages location if you changed it.

Sorry but i dont have a clue what u mean that i shall do with em.... :P
I find em, see the switches for em but understand nothing, for example if i wanna add a user called oddjob how do i do ?! and the homedir i want him in is /home/oddjob and i want him to have access to manage to make dirs and add files that are shown without using any more programs to set the correct flags on the files for web users to be able to view em....
 
Old 01-04-2006, 03:09 PM   #14
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381

Rep: Reputation: 47
google for setting up a ftp server. There are lots of tutorials on how to do that. I would also use the LQ tutorials and wiki.
 
Old 01-04-2006, 03:10 PM   #15
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
OK.
First thing to do is create a group for oddjob. The command groupadd oddjob should do the trick. If useradd is a touch confusing, try adduser, which will ask you the questions that are needed to set up a user such as teh username, group and home directory. If you run through that, oddjob should be the owner of /home/oddjob, in which case they aren't going to have to worry much about permissions in /home/oddjob.

If you get past this, then it is time to mess with Apache. By default, Apache runs under the nobody:nogroup user and group. That means that Apache won't be able to read the files in /home/oddjob. If you want your web pages to be served out of /home/oddjob, then you need to run Apache as oddjob user. You do that by editing your /etc/apache/httpd.conf file. If you read through that, you'll find a directive that sets the user Apache runs under. Just change that to oddjob and restart Apache (/etc/rc.d/rc.httpd restart). Of course you will also have to set the document root for Apache to point to /home/oddjob if that is where your web pages are. There is another directive in httpd.conf that allows you to do that.
 
  


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
Cannot SSH/FTP by hostname, but ip works joshtt Linux - Networking 3 09-20-2005 05:08 AM
apache works, website works, but not from outside? kahn Linux - Software 7 08-05-2005 02:38 AM
FTP behind router. Only Intranet works.. Mega Man X Linux - Networking 6 09-07-2004 07:05 PM
ftp works but http doesn't :/ bsprogs Linux - Newbie 1 10-10-2003 11:03 PM
ftp only works localy locke Linux - Security 1 01-20-2002 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:25 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
Open Source Consulting | Domain Registration