Find the answer to your Linux question:
Page 9 of 12 FirstFirst ... 5 6 7 8 9 10 11 12 LastLast
Results 81 to 90 of 120
I did not start the app in root. I started it in /var/www/html/retention. This where I have been running the tests. The user with the FTP access is development in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #81
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61

    I did not start the app in root. I started it in /var/www/html/retention. This where I have been running the tests. The user with the FTP access is development in the group of ftp. The response from post #55 was done when I was running the tests in the /tmp directory. You advised that I should not do that. This is why I changed to my upload directory to run the tests. I go to the directory of /var/www/html/retention as the user "administrator" and run the following:

    echo -n > /tmp/emptyconfig
    echo -n > /tmp/vsftpd.log
    /usr/sbin/vsftpd -olisten_port=5555 -opasv_min_port=5556 -opasv_max_port=5557 -oport_enable=NO -olisten=true -orun_as_launching_user=true -oanon_world_readable_only=false -odual_log_enable=yes -olog_ftp_protocol=yes -ovsftpd_log_file=/tmp/vsftpd.log -oxferlog_file=/tmp/vsftpd.log -owrite_enable=true -oanon_upload_enable=true -oanon_mkdir_write_enable=true -oanon_other_write_enable=true -oseccomp_sandbox=no -olocal_enable=no /tmp/emptyconfig | tail -F /tmp/vsftpd.log

    I then connect up anonymously with filezilla with no delay. And I copied the responses and pasted them here. I am just trying to spell out everything I did to give you the output. Maybe I did something wrong somewhere???

  2. #82
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    The user owning that directory is called development with group ftp. Could you consider changing the owner and group of /var/www/html/retention to administrator?

    Code:
    chown administrator:administrator /var/www/html/retention
    you can reset this with:

    Code:
    chown development:ftp /var/www/html/retention

  3. #83
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    I did a "sudo chown administrator:administrator /var/www/html/retention" as you requested. Below is the data gathered from that. I then did a "sudo chown development:ftp /var/www/html/retention" to reset it back.

    [administrator@webforms retention]$ ls -lad
    drwxrwxrwx. 7 administrator administrator 4096 Feb 19 11:21 .
    [administrator@webforms retention]$


    Status: Connecting to 172.16.0.114:21...
    Status: Connection established, waiting for welcome message...
    Response: 220 Welcome to Vic Rattlehead FTP service.
    Command: USER anonymous
    Response: 331 Please specify the password.
    Command: PASS **************
    Response: 230 Login successful.
    Command: SYST
    Response: 215 UNIX Type: L8
    Command: FEAT
    Response: 211-Features:
    Response: EPRT
    Response: EPSV
    Response: MDTM
    Response: PASV
    Response: REST STREAM
    Response: SIZE
    Response: TVFS
    Response: UTF8
    Response: 211 End
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status: Connected
    Status: Retrieving directory listing...
    Command: PWD
    Response: 257 "/"
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (172,16,0,114,217,230).
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Transfer done (but failed to open directory).
    Status: Directory listing successful

  4. #84
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Quote Originally Posted by Herculeon View Post
    Command: PWD
    Response: 257 "/"
    < snip >
    Response: 150 Here comes the directory listing.
    Response: 226 Transfer done (but failed to open directory).
    Status: Directory listing successful
    Weird, this could be your cause of delay. Just don't know what is causing the delay :/ . Just for the record, do this (literally):

    Code:
    sudo echo -n > /tmp/emptyconfig
    sudo echo -n > /tmp/vsftpd.log
    
    sudo chown administrator:administrator \
    /var/www/html/retention \
    /tmp/emptyconfig \
    /tmp/vsftpd.log
    
    sudo chmod 770 \
    /var/www/html/retention \
    /tmp/emptyconfig \
    /tmp/vsftpd.log
    
    cd /var/www/html/retention
    
    su -c '/usr/sbin/vsftpd -olisten_port=5555 -opasv_min_port=5556 -opasv_max_port=5557 -oport_enable=NO \
    -olisten=true -orun_as_launching_user=true -oanon_world_readable_only=false -odual_log_enable=yes \
    -olog_ftp_protocol=yes -ovsftpd_log_file=/tmp/vsftpd.log -oxferlog_file=/tmp/vsftpd.log -owrite_enable=true \
    -oanon_upload_enable=true -oanon_mkdir_write_enable=true -oanon_other_write_enable=true -oseccomp_sandbox=no \
    -olocal_enable=no /tmp/emptyconfig | tail -F /tmp/vsftpd.log' administrator
    
    # login, try to upload, provide logs again
    # CTRL+C
    # Reset everything else
    sudo chown development:ftp /var/www/html/retention
    EDIT: A '\' in commands means that the command plus arguments is continuing on the following line! For example:

    Code:
    sudo chown administrator:administrator \
    /var/www/html/retention \
    /tmp/emptyconfig \
    /tmp/vsftpd.log
    Is actually:

    Code:
    sudo chown administrator:administrator /var/www/html/retention /tmp/emptyconfig /tmp/vsftpd.log
    So starting in the wrong place, you might end up with:

    Code:
    /var/www/html/retention /tmp/emptyconfig /tmp/vsftpd.log
    Which is incorrect, it's not even a command!. Keep this in mind everytime someone is posting commands!

    EDIT2: All commands you execute, except for the vsftpd / tail command, should not give any output. If they do, please post that output.
    Last edited by Rexilion; 02-22-2013 at 06:31 AM.

  5. #85
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    Thanks for the clarification.

    Ok, I copied the commands out and took out the \ between the lines and made it into one long string of commands, entered my su password at the completion, nothing was listed on the screen output, I got :

    Password:
    ^C
    Session terminated, killing shell... ...killed.
    [administrator@webforms retention]$

    When I did a ctrl c to stop it. there is nothing in the file of /tmp/vsftpd.log which like you said it is to be expected. yes, I do change the ftp server name so I can verify that setting take effect when a significant change change occurs or a testing needs to occur.

    Status: Connecting to 172.16.0.114:21...
    Status: Connection established, waiting for welcome message...
    Response: 220 Welcome to Dionysus FTP service.
    Command: USER anonymous
    Response: 331 Please specify the password.
    Command: PASS **************
    Response: 230 Login successful.
    Command: SYST
    Response: 215 UNIX Type: L8
    Command: FEAT
    Response: 211-Features:
    Response: EPRT
    Response: EPSV
    Response: MDTM
    Response: PASV
    Response: REST STREAM
    Response: SIZE
    Response: TVFS
    Response: UTF8
    Response: 211 End
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status: Connected
    Status: Retrieving directory listing...
    Command: PWD
    Response: 257 "/"
    Command: TYPE I
    Response: 200 Switching to Binary mode.
    Command: PASV
    Response: 227 Entering Passive Mode (172,16,0,114,224,192).
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Transfer done (but failed to open directory).
    Status: Directory listing successful
    Status: Connecting to 172.16.0.114:21...
    Status: Connection established, waiting for welcome message...
    Response: 220 Welcome to Dionysus FTP service.
    Command: USER anonymous
    Response: 331 Please specify the password.
    Command: PASS **************
    Response: 230 Login successful.
    Command: OPTS UTF8 ON
    Response: 200 Always in UTF8 mode.
    Status: Connected
    Status: Starting upload of C:\gpreport.html
    Command: CWD /
    Response: 250 Directory successfully changed.
    Command: PWD
    Response: 257 "/"
    Command: TYPE A
    Response: 200 Switching to ASCII mode.
    Command: PASV
    Response: 227 Entering Passive Mode (172,16,0,114,251,142).
    Command: STOR gpreport.html
    Response: 553 Could not create file.
    Error: Critical file transfer error

  6. #86
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Quote Originally Posted by Herculeon View Post
    Ok, I copied the commands out and took out the \ between the lines and made it into one long string of commands
    Ah, that is not needed. I should have been more clear about that. Your shell (prompt) will reattach the commands appropiatly for you. You could have just copy pasted the above straight into your shell.

    Quote Originally Posted by Herculeon View Post
    there is nothing in the file of /tmp/vsftpd.log which like you said it is to be expected.
    Well there should be. /tmp/emptyconfig should be empty. /tmp/vsftpd.log contains the stuff you see in your terminal since tail follows that file. It should NOT be empty. If I said that, I was wrong.

    Quote Originally Posted by Herculeon View Post
    yes, I do change the ftp server name so I can verify that setting take effect when a significant change change occurs or a testing needs to occur.
    What do you mean by this? Do you alter vsftpd settings? Nameserver? If you press CTRL+C after starting vsftpd it gets killed and everything related to vsftpd is gone. No need to change DNS names, ip's or anything else. Once you terminate the command, it's gone. No remnants, no open ports, no stale configuration, no nothing. Just gone. Maybe just the files you uploaded (if we ever get that to work). Until you start vsftpd again of couse.

    Quote Originally Posted by Herculeon View Post
    Command: PWD
    Response: 257 "/"
    I cannot see how this went wrong again. the command 'cd /var/www/html/retention' does not seem to be working? Do you actually change directory when you execute this? This is probably a symptom of all our trouble. It's not a symlink either... weird :/ Could you tell me more about this? Do you execute 'cd /' or something?

    I compared the outputs you gave. The one in post #7 (looong way back...) looks better in this respect:

    Command: PWD
    Response: 257 "/var/www/html"
    So, I'm guessing it is a permission issue?

    Please, provide the output of (and let the terminal do the work for you):

    Code:
    ls -lad \
    /var \
    /var/www \
    /var/www/html \
    /var/www/html/retention
    Hang in there...

  7. #87
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    I just saw you have been testing the wrong FTP server al along

    You are connecting to port 21 and should connect to port 5555 to connect to the FTP server we are currently starting(!)


    In your output you always connect to port 21(!). This should be port 5555(!). Try again what we did in post #84 if this mistake is genuine.

    Status: Connecting to 172.16.0.114:21...

    That is why your /tmp/vsftpd.log is always empty. Should have noted this before. The terminal where you executed vsftpd should provide output by itself.

  8. #88
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    Rexilion,
    Well, now that you pointed out that error, all is well. I did not see I was connecting to a wrong port. OOPS. I have since run the command and connected on port 5555. Below is the pastebin data. I was able to attach successfully with no delay and create a garbage file and delete it fine in the FTP directory. So that is progress.

    port 5555 - Pastebin.com


    Here is the ls -lad for those directories:
    [administrator@webforms tmp]$ ls -lad /var /var/www /var/www/html /var/www/html/retention
    drwxr-xr-x. 21 root root 4096 Dec 4 09:32 /var
    drwxrwxrwx. 6 root root 4096 Jan 29 07:38 /var/www
    drwxrwxrwx. 26 development ftp 4096 Jan 29 07:38 /var/www/html
    drwxrwx---. 8 development ftp 4096 Feb 26 10:37 /var/www/html/retention
    [administrator@webforms tmp]$
    Last edited by Herculeon; 02-26-2013 at 02:48 PM. Reason: needed the ls -lad you asked for.

  9. #89
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Sweet! We now have to try to get this configuration back into your system infra. Here goes:

    Code:
    listen_port=5555 
    pasv_min_port=5556
    pasv_max_port=5557
    port_enable=NO
    listen=true
    anon_world_readable_only=false
    dual_log_enable=yes
    log_ftp_protocol=yes
    vsftpd_log_file=/tmp/vsftpd.log
    xferlog_file=/tmp/vsftpd.log
    write_enable=true
    anon_upload_enable=true
    anon_mkdir_write_enable=true
    anon_other_write_enable=true
    seccomp_sandbox=no
    local_enable=no
    
    run_as_launching_user=false
    ftp_username=administrator
    nopriv_user=administrator
    Paste the above in /etc/vsftpd.conf and restart vsftpd. Port 21 should not work anymore, so only use 5555 from now on (we change this back later). No more room to make mistakes . Furthermore, I made minor modification to mimic the commandline execution so we can go step by step to reproduce the issue and see what is causing the hangs. Good luck!

    Btw, you will end up in the homedirectory of administrator. If that is the same as '/var/www/html/retention', then it should just work. Otherwise you have to navigate to it with your FTP client.

    Log output can be found in /tmp/vsftpd.log again. You can watch this by doing:

    Code:
    tail -F /tmp/vsftpd.log
    Provide the new output of you start testing with this.

  10. #90
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    Ok, with that in as the only thing entered in as the vsftpd.conf and all else removed, I get in filezilla:

    Status: Connecting to 172.16.0.114:5555...
    Status: Connection established, waiting for welcome message...
    Response: 500 OOPS: failed to open xferlog log file:/tmp/vsftpd.log
    Error: Critical error
    Error: Could not connect to server

Page 9 of 12 FirstFirst ... 5 6 7 8 9 10 11 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •