Link to home
Start Free TrialLog in
Avatar of ywainberg
ywainbergFlag for Israel

asked on

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 ?
Avatar of sihar86
sihar86
Flag of Indonesia image

early question is what is your program ftp name?
Avatar of ywainberg

ASKER

vsftpd

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

http://vsftpd.beasts.org/vsftpd_conf.html
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
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
Try to start the service and then please check the logs in /var/log/messages
If found something then please show us the output.
nothing in the logs....
If you have seen something in
 /var/log/vsftpd.log

Then please show us.

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

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

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

# ls -la /etc/vsftpd/
i don't have such a file in the /etc/ssl/private folder
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

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

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

# ls -la /etc/vsftpd.conf
#rsa_cert_file=/etc/ssl/private/vsftpd.pem

-rw-r--r-- 1 root root 5611 Mar 21 09:56 /etc/vsftpd.conf
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


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
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.
cant stop iptables , the system doesn't seems to know any file or service with the name iptables
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"
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
ASKER CERTIFIED SOLUTION
Avatar of upanwar
upanwar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks