LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-19-2009, 09:16 PM   #1
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Rep: Reputation: 0
Can not see directories in Fedora


Hi All
I'm running Fedora with apache all setup as a web server and run the test page from my browser.
I ftp log on with WS_FTP Pro and all's fine, but I only see a PUB directory and nothing else. I would like to FTP to /var/www/html directory to load my test web site. I've set permissions to read these directories but nothing. Am I missng something. Any help is appreciated
regards.
 
Old 12-21-2009, 05:54 AM   #2
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
are you using vsftpd as your ftp server on Fedora? And are you using an anonymous ftp login?
If so, the default location for anonymous logins is /var/ftp
You can change this in /etc/vsftp/vsftpd.conf. I think the line is: anon_root=/var/ftp
Change the path to /var/www/html
You may not already have this line as it's a default, so just add it and restart the service.
 
1 members found this post helpful.
Old 12-21-2009, 11:26 PM   #3
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi, thanks for that. I did work that out but now my web page will not load I tried restarting httpd but I get
-
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80

and my WS_FTP Pro says

-
Failed to receive response after connect

I'll have to dig deeper. Apprecaite all the help I can get. If I reboot my server what services do I have to manually start or where can I set auto start ??

I loaded Fedora 11, apache, php, perl, mysql, vsftpd and all went well, loaded the apache test page, but for some reason it's all turned to brown runny stuff, by just trying to ftp pages to /var/www/html.

best regards
 
Old 12-22-2009, 04:56 AM   #4
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
to auto start services, use the chkconfig command.
`chkconfig --list` to get a list of all your services.
`chkconfig httpd on` to have Apache auto start in runlevel 3 & 5 (which is what you want).
`chkconfig vsftpd on` to have vsftpd start.
`chkconfig mysqld on` to have mysql start .... etc for any other services.

Your "could not bind to address [::]:80" error looks like something might already be using that port. I am assuming you didn't configure vsftpd to also use port 80 did you? Does it fix itself after a restart - which would mean it didn't stop gracefully. Are you using IPv6 or just IPv4? Try the command `netstat -pantl |grep :80` to get a listing of what services are listening on that port. It should be httpd if the service is started.

Finally, once you get httpd started without errors and listening on port 80, if you still cant bring up your webpage, check the permissions on your website. For testing, the command `chmod 755 -R /var/www/html` should ensure they are readable.

Last edited by zQUEz; 12-22-2009 at 04:57 AM.
 
1 members found this post helpful.
Old 12-23-2009, 07:18 PM   #5
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi, yep, httpd is now working and I can see the apache default page. But I can not ftp to /var/www/html to load my test site. I'm using WS_FTP Pro and I get:
Connecting to 192.168.0.9:21
Connected to 192.168.0.9:21, Waiting for Server Response
Failed to receive response after connect

All the directories have had permissions set and I'm running vsftpd as:
[root@webdomain ~]# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]

I've set to vsftpd to logon as anonymous. I've read 100's of pages on vsftpd and everyone has a different idea of what to do.

And no more port errors.

And there is more (if its part of this forum), check this and comment

[root@webdomain ~]# rpm -q mysql
mysql-5.1.41-2.fc11.i586
[root@webdomain ~]# mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Guess what I'm doing over holiday season. Any help is very much appreciated. Every thing when find from a blank HDD to installing/running Fedora 11 everything except my ftp access. Down hill from there.

Best for the holidays

Colin
 
Old 12-23-2009, 07:29 PM   #6
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi

I've tried SmartFTP which gave me some more detail

[11:26:48] Resolving host name "192.168.0.9"
[11:26:48] Connecting to 192.168.0.9 Port: 21
[11:26:48] Connected to 192.168.0.9.
[11:26:48] 500 OOPS: vsftpd: cannot locate user specified in 'chown_username':whoever
[11:26:48] Server closed connection
[11:26:48] Connect failed. Waiting to retry (30s)...

I don't know why it says this as I've turned that part in vsftpd off?? and trying to log in anonymous

Cheers
 
Old 12-23-2009, 07:51 PM   #7
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi All

I'm getting there I can now ftp in to the server, (no erros - all running) but defaults to /var/pub and not /var/www/html. There must be a default setting somewhere. Any ideas

Thanks

Colin
 
Old 12-24-2009, 03:56 AM   #8
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
My original post describes the part about changing the default "pub" location. Take a look below ....

Quote:
Originally Posted by zQUEz View Post
are you using vsftpd as your ftp server on Fedora? And are you using an anonymous ftp login?
If so, the default location for anonymous logins is /var/ftp
You can change this in /etc/vsftp/vsftpd.conf. I think the line is: anon_root=/var/ftp
Change the path to /var/www/html
You may not already have this line as it's a default, so just add it and restart the service.
 
1 members found this post helpful.
Old 12-24-2009, 05:04 PM   #9
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks ZQUEz

Thanks for your help. I'm getting there. I now can log in /var/www/html. But can not do any thing once there.
I've set every thing to 777 on my server (directories and files, temporary), set up users and set all the user permissions on vsftpd. All I get is 500 errors on my WS_FTP Pro when logging in. This may be getting outside this forum now. As said before I've looked at 100's of options in setting up vsftpd, tried many combinations of settings. Once I crack this all, it'll be good. Phew, talk about a crash course in linux. I've learnt heaps over the last few days.

Best

Colin
 
Old 12-24-2009, 05:55 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
hi carparknz ferdora and setting it up as a server is NOT a good idea the lifespan ( 13 months) for fedora is WAY to short

BUT if you DO want to reinstall the server EVERY 6 MONTHS when a new version of fedora is released -- go ahead

But i would use the LONG life CentOS instead
a 5 year life span vers 13 months.
 
1 members found this post helpful.
Old 12-25-2009, 08:59 PM   #11
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi John VV
Well you learn something every day re update software.
I'll certinaly look at CentOS
It's just the Feadora set up so easily until I tried to load up to my www page with Dreamweaver 4 and WS-FTP Pro and then it turned to brown stuff.
Thanks again all for your help. I may be running around in these pages for a while asking at time some dumb questions.
All input is most greatfully apprecaited.
Best
Colin (slow to learn Kiwi)
 
Old 12-25-2009, 11:42 PM   #12
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi All
I've done my dash for now. I have done everything running ok except being able ftp in to my /var/www/ page
Here is my vsftpd settings if someone can spot the error

anonymous_enable=NO
local_enable=YES
write_enable=YES
#local_umask=0022
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=carrparknz
ftp_username=carrparknz
xferlog_file=/var/log/vsftpd.log
#xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
#ftpd_banner=Welcome to blah FTP service.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd/chroot_list
#ls_recurse_enable=YES
listen=YES
#listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
anon_root=/var/www
local_root=/var/www
log_ftp_protocol=YES
passwd_chroot_enable=YES
asv_max_port=1024
no_anon_password=YES
use_localtime=YES
chroot_local_user=YES
guest_enable=YES
hide_ids=YES
file_open_mode=0777
chmod_enable=YES
chown_uploads=YES
dirlist_enable=YES
download_enable=YES

best
Colin
 
Old 12-28-2009, 04:25 AM   #13
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
do you have selinux enabled? It is turned on by default when you install Fedora. Type command `getenforce` and see whether it is enabled/disabled.

If it is enabled, change to "permissive" using command `setenforce 0` and then restart your services to see if that changes anything.
 
1 members found this post helpful.
Old 12-31-2009, 06:24 PM   #14
carparknz
LQ Newbie
 
Registered: Oct 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Hi zQUEz
Thanks for the feedback and help. Very much appreciated. I've disabled selinux as you described, but unfortunately no change to my problem. I think this thread has run out by now. There is something I've missed throughout this exercise. I've trawled through 100's of suggestions and people saying 'yep, thats fixed it', but in my case 'no change to the problem'. I've tried many FTP clients and all report the same '500: ......errors'. It's somewhere in one of the config files, either fedora, httpd or vsftpd. Things started off so well I thought this 'Linux' experience was a buzz.
I'm a month behind my project now. I've learnt a lot, but I think my best way is to 'flat line' the server and start again and re-look at the linux version. So, I'm open to suggestions on the best linux version/brand.
Once again, thanks for the help.
Colin
 
Old 12-31-2009, 07:07 PM   #15
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
I've learnt a lot, but I think my best way is to 'flat line' the server
in my opinion Fedora IS NOT A GOOD CHOICE for a server , do not use in for a server .
use CentOS 5.4 .
 
  


Reply



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
Fedora Directory Server with pGina, mounting home directories? Exutable Linux - Server 5 11-28-2007 02:07 AM
Apache User Directories problem in Fedora 5 Core upgrade SparceMatrix Linux - Security 6 04-25-2006 10:15 PM
fedora directory server + home directories climbingmerlin Linux - Software 3 04-08-2006 03:41 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
Fedora Core 3: How to get the kernel source code into the relevant directories? Madhavikutty Fedora 5 03-10-2005 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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