?
Solved

conf file

Posted on 2011-03-20
38
Medium Priority
?
656 Views
Last Modified: 2012-05-11
hi
how do i know which conf file the application is using in Linux?

i have an ftp program and 4 conf file in the system ,how do i know from which conf file the application is using ?
0
Comment
Question by:ywainberg
  • 18
  • 14
  • 4
  • +1
38 Comments
 
LVL 2

Expert Comment

by:sihar86
ID: 35174760
early question is what is your program ftp name?
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35174763
vsftpd

i get a connection refused now...
0
 
LVL 5

Expert Comment

by:paulqna
ID: 35174809
The man page from the ftp deamon will tell you how to specify which conf file it has to use when starting it manually.

The /etc/init.d/<ftpd name> script will show what will be used at system startup.

The "ps -ef|grep ftp" command will show running ftp processes with their commandline options, possibly it will also show the config file as commandline option.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 2

Expert Comment

by:sihar86
ID: 35174820
make sure your firewall doesn't block your ftp connection
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35174836
nothing has change with firewall , i tried to change something in the configuration file and i might damage it ,and i don't know what seems to be the problem that i get connection refused
0
 
LVL 2

Expert Comment

by:sihar86
ID: 35174867
please check your vsftpd log.
by default vsftpd log located here /var/log/vsftpd.log.
put some vsftpd log content here
0
 
LVL 5

Expert Comment

by:paulqna
ID: 35174879
You should change your initial question as this is not what you want to know.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35174883
there is only connection log raws ,login connect or login failed
0
 
LVL 2

Expert Comment

by:sihar86
ID: 35174890
please check your setting in part of
- userlist_enable
- userlist_deny
- userlist_file in vstpd.conf

http://vsftpd.beasts.org/vsftpd_conf.html
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35175124
Connect refused means your system is not running with ftp service. Make sure your system is running vsftpd service.

# ps -ef | grep -i ftp

or

# /ect/init.d/vsftpd status
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35175361
first of all you are correct ,it seems that mt vsftpd service un not running
the problem is that when i start the service /etc/init.d/vsftpd start ,is gives an output of starting ftp... but when i check status again it gives me that the service is not running
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35175375
Try to start the service and then please check the logs in /var/log/messages
If found something then please show us the output.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35175409
nothing in the logs....
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35175443
If you have seen something in
 /var/log/vsftpd.log

Then please show us.

Without any error message we can't say anything.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35175630
the log only shows that i manage to connect in the morning ,but no errors
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35175649
Could you please show us your conf file of vsftpd and highlight the changes which you have made.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35178561
hi
i attached the conf file (just change the extension file type from .txt to .conf)

thanks
  vsftpd.txt
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178601
Could you please show us output of:

# ls -la /etc/ssl/private/vsftpd.pem
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178608
Also show us output of:

# ls -la /etc/vsftpd/
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35178610
i don't have such a file in the /etc/ssl/private folder
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178618
ok. Then comment below given line in your vsftpd.conf file ans start the service for vsftpd. It should work.

rsa_cert_file=/etc/ssl/private/vsftpd.pem

0
 
LVL 2

Author Comment

by:ywainberg
ID: 35178619
i don't have a folder vsftpd in  /etc
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178626
Ok no problem just comment below given line in your vsftpd.conf file ans start the service for vsftpd. It should work.

rsa_cert_file=/etc/ssl/private/vsftpd.pem
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35178637
it seems that the command you send me passed through but i still don't have a vsftpd.pem in that folder
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178653
Proble is you dont have file /etc/ssl/private/vsftpd.pem but in your vsftpd.conf you are trying to use that file and that is the reason, your vsftpd service is not getting start.

so open your vsftpd.conf file and find the line
rsa_cert_file=/etc/ssl/private/vsftpd.pem

in that file and just put # in front of that lin. Now save the file and close it and try to start the vsftpd service.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35178664
did not work my friend
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178671
Ok. Could you please show me directory listing of directory where you have kept your vsftpd.conf and also send me the file /etc/init.d/vsftpd.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35178676
there are 3 files in the /etc folder : vsftpd.conf ,vsftpd.chroot_list ,vsftpd.userlist
 vsftpd
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35178971
show me output of.

# cat /etc/vsftpd.conf | grep -i rsa_cert_file

# ls -la /etc/vsftpd.conf
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35179089
#rsa_cert_file=/etc/ssl/private/vsftpd.pem

-rw-r--r-- 1 root root 5611 Mar 21 09:56 /etc/vsftpd.conf
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35179647
When you trying to start vsftpd service. What error you are getting in  /var/log/vsftpd.log

start the service:

# /etc/init.d/vsftpd start (to start the service)

# /etc/init.d/vsftpd status (to get the status of vsftpd service)

# tail -f /var/log/vsftpd.log

Also show the output of below given command.

# iptables -L -v


0
 
LVL 2

Author Comment

by:ywainberg
ID: 35179693
the service indicate starting but status shows it is not running

the log file doesn't show anything

ip tables output is in the attached file  
new-file
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35179983
Just disable the iptables and try to start th ftp service.

# iptables --flush

# /etc/init.d/iptables stop

# /etc/init.d/vsftpd start

# /etc/init.d/vsftpd status

and update us if you face any challenge.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35180197
cant stop iptables , the system doesn't seems to know any file or service with the name iptables
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35180400
hi

i removed and installed the vsftpd server again and the service is now running

the problem is when i want to enter the ftp i get an error "500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp"
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35180476
i managed to make it work
i added to the conf file "ftp_username=nobody" and it paved the way

do you know how to restrict the ftp user only to a single folder?

when i log to the ftp i discovered that i can walk through the directories and not only the local user folder
0
 
LVL 12

Accepted Solution

by:
upanwar earned 1000 total points
ID: 35180563
Open vsftpd configuration file - /etc/vsftpd/vsftpd.conf
# vi /etc/vsftpd/vsftpd.conf
Make sure following line exists (and uncommented):
chroot_local_user=YES
Save and close the file. Restart vsftpd.
# /etc/init.d/vsftpd restart

Now check and update.
0
 
LVL 2

Author Comment

by:ywainberg
ID: 35180680
thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month17 days, 5 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question