conf file

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 ?
LVL 2
ywainbergAsked:
Who is Participating?
 
upanwarConnect With a Mentor Commented:
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
 
sihar86Commented:
early question is what is your program ftp name?
0
 
ywainbergAuthor Commented:
vsftpd

i get a connection refused now...
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
paulqnaCommented:
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
 
sihar86Commented:
make sure your firewall doesn't block your ftp connection
0
 
ywainbergAuthor Commented:
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
 
sihar86Commented:
please check your vsftpd log.
by default vsftpd log located here /var/log/vsftpd.log.
put some vsftpd log content here
0
 
paulqnaCommented:
You should change your initial question as this is not what you want to know.
0
 
ywainbergAuthor Commented:
there is only connection log raws ,login connect or login failed
0
 
sihar86Commented:
please check your setting in part of
- userlist_enable
- userlist_deny
- userlist_file in vstpd.conf

http://vsftpd.beasts.org/vsftpd_conf.html
0
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
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
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
nothing in the logs....
0
 
upanwarCommented:
If you have seen something in
 /var/log/vsftpd.log

Then please show us.

Without any error message we can't say anything.
0
 
ywainbergAuthor Commented:
the log only shows that i manage to connect in the morning ,but no errors
0
 
upanwarCommented:
Could you please show us your conf file of vsftpd and highlight the changes which you have made.
0
 
ywainbergAuthor Commented:
hi
i attached the conf file (just change the extension file type from .txt to .conf)

thanks
  vsftpd.txt
0
 
upanwarCommented:
Could you please show us output of:

# ls -la /etc/ssl/private/vsftpd.pem
0
 
upanwarCommented:
Also show us output of:

# ls -la /etc/vsftpd/
0
 
ywainbergAuthor Commented:
i don't have such a file in the /etc/ssl/private folder
0
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
i don't have a folder vsftpd in  /etc
0
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
it seems that the command you send me passed through but i still don't have a vsftpd.pem in that folder
0
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
did not work my friend
0
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
there are 3 files in the /etc folder : vsftpd.conf ,vsftpd.chroot_list ,vsftpd.userlist
 vsftpd
0
 
upanwarCommented:
show me output of.

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

# ls -la /etc/vsftpd.conf
0
 
ywainbergAuthor Commented:
#rsa_cert_file=/etc/ssl/private/vsftpd.pem

-rw-r--r-- 1 root root 5611 Mar 21 09:56 /etc/vsftpd.conf
0
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
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
 
upanwarCommented:
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
 
ywainbergAuthor Commented:
cant stop iptables , the system doesn't seems to know any file or service with the name iptables
0
 
ywainbergAuthor Commented:
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
 
ywainbergAuthor Commented:
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
 
ywainbergAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.