Command Not Found even after adding Path

Hey all,
I am stuck in module 3.I have trouble using the vsftpd_v1 command.I have added the path of the executable to PATH,added executable permissions and used sudo to run ,still it shows command not found.
Please help.
Thanks

you dont need to add to path

can run using ./vsftpd_v1

1 Like

Go into the directory where your vsftpd_v1 file is present and then do what anugrah said.

1 Like

By running ./vsftpd_v1 gives an error
500 OOPS: vsftpd: must be started as root (see run_as_launching_user option)

Is your problem solved??bcoz I am having the same problem.

Run the command vsftpd_v1 vsftpd_v1.conf in the root to start your server

What is your problem exactly?

I am not able to run vsftpd_v1 even after using sudo …it is showing blank now

there are many solutions . best one is goto that folder and make sure you change permissions to give ownership to root and than execute the command. or alternatively you can pass your local setted PATH variable to sudo

give +x to vsftpd_v1 before
sudo ./<vsftpd> <.conf>

As a security measure on Debian, /etc/sudoers has the secure_path option set to a safe value.
Hence sudo would take the value of PATH before you changed it in your .bashrc

For running the script as root chown to root and use sudo as
sudo env "PATH=$PATH" vsftpd_v1 vsftpd_v1.conf
after changing the PATH in .bashrc
It worked for me

~/workspace/QBox$ sudo ./vsftpd_v1
[sudo] password for crio-user:
which password i have used here? i am not able to use the crio password. i made the vsftpd file executable still i m not able to run the server???

sometimes you select blank spaces while copying password from crio workspace, make sure that you are only selecting password characters.

I’m getting the same error.
tried many things to resolve the error
could u plz help with this

Can you please tell me what command you are typing, also show the error you are getting as well.

crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo ./vsftpd_v1 vsftpd_v1.conf
[sudo] password for crio-user:
500 OOPS: config file not owned by correct user, or not a file
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo chown root:root /etc/vsftpd.conf
chown: cannot access ‘/etc/vsftpd.conf’: No such file or directory
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo chown root:root /vsftpd_v1.conf
chown: cannot access ‘/vsftpd_v1.conf’: No such file or directory
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo chown root:root /vsftpd_v1
chown: cannot access ‘/vsftpd_v1’: No such file or directory
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chmode +x vsftpd_v1.conf

Command ‘chmode’ not found, did you mean:

command ‘chmod’ from deb coreutils

Try: sudo apt install

crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chmod +x vsftpd_v1.conf
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ ./vsftpd_v1.conf
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo ./vsftpd_v1 vsftpd_v1.conf
500 OOPS: config file not owned by correct user, or not a file
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ vsftpd_v1 vsftpd_v1.conf
vsftpd_v1: command not found
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo env "PATH=PATH" vsftpd_v1 vsftpd_v1.conf env: ‘vsftpd_v1’: No such file or directory crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox sudo chown root:root /vsftpd_v1
chown: cannot access ‘/vsftpd_v1’: No such file or directory
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo chown root:root ./vsftpd_v1
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo env "PATH=PATH" vsftpd_v1 vsftpd_v1.conf env: ‘vsftpd_v1’: No such file or directory crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox sudo ./vsftpd_v1 vsftpd.conf
500 OOPS: cannot read config file: vsftpd.conf
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chmod +x vsftpd.conf
chmod: cannot access ‘vsftpd.conf’: No such file or directory
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chmod +x /vsftpd.conf
chmod: cannot access ‘/vsftpd.conf’: No such file or directory
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo ./vsftpd_v1 vsftpd_v1.conf
500 OOPS: config file not owned by correct user, or not a file
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chmod +x /vsftpd_v1.conf
chmod: cannot access ‘/vsftpd_v1.conf’: No such file or directory
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chmod +x vsftpd_v1.conf
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo ./vsftpd_v1 vsftpd_v1.conf
500 OOPS: config file not owned by correct user, or not a file
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chroot_local_user=YES
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chroot_list_enable=YES
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ chroot_list_file=/etc/vsftpd.chroot_list
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ sudo ./vsftpd_v1 vsftpd_v1.conf
500 OOPS: config file not owned by correct user, or not a file
crio-user@mansi-mishra-cs-2016-miet-ac:~/workspace/QBox$ vsftpd_v1 vsftpd_v1.conf
vsftpd_v1: command not found

could u plz help me with this

see this: Linux File Owner and Assosiated Permissions
and please try to share a screenshot it will be easy for us to understand from a screenshot.

1 Like

The error clearly says - 500 OOPS: config file not owned by correct user, or not a file, which means the config file is not owned by the correct user.

  • Search about chown are you might find your solution.
1 Like

500 OOPS: could not bind listening IPv4 socket why this error is coming