Find the answer to your Linux question:
Page 8 of 12 FirstFirst ... 4 5 6 7 8 9 10 11 12 LastLast
Results 71 to 80 of 120
Well, I got a permissions denied when I did the "echo vsftpd > /tmp/vsftpd.log" but not on the "cat /tmp/emptyconfig". I then did a "chown administrator /tmp/vsftpd.log" and tried the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #71
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61

    Well, I got a permissions denied when I did the "echo vsftpd > /tmp/vsftpd.log" but not on the "cat /tmp/emptyconfig". I then did a "chown administrator /tmp/vsftpd.log" and tried the echo again. It was successful. Then I ran :
    touch /tmp/emptyconfig
    /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

    This was successful plus there was no delay. Only "problem" is that it does say, after the command is run, "500 OOPS: cannot read config file: tail". The only information in the vsftpd.log is the following:

    vsftpd


    That is all that is in there in the /tmp directory after connecting to the ftp with the anonymous access. There is nothing in the vsftpd.log file that was created in the directory that I ran the command in.

  2. #72
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Quote Originally Posted by Herculeon View Post
    "500 OOPS: cannot read config file: tail". The only information in the vsftpd.log is the following:

    vsftpd


    That is all that is in there in the /tmp directory after connecting to the ftp with the anonymous access.
    I think you did an incorrect invocation of the command I supplied. This could probably be attributed to the wrapping of this forum.

    Good job resolving the access issue's. You are getting the hang of it!

    First commands clear history and reset config status. Third command starts the server.

    Note, the character between '/tmp/emptyconfig' and 'tail -F' is not an ordinary character. It's the pipe symbol. It's below backspace on my keyboard, you have to use it with SHIFT. So you type: 'SHIFT + \' in order to get the '|' symbol.

    If you use SSH, I suggest you try to copy and paste (and verify!).

    Code:
    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
    Ow and if you are in learning mode. We are abusing the pipe symbol here. I only use it, so that if you press ctrl + c you also abort the vsftpd process. This is easier to work with and prevents stray vsftpd processes running in the background. The actual functional part of the pipe symbol is unused as vsftpd does not output to stdout. Only to stderr and /tmp/vsftpd.log.
    Last edited by Rexilion; 02-18-2013 at 02:51 PM. Reason: Emberassing typo XD

  3. #73
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    Ok, I did not pay attention to that last pipe and took it out when I put the command in. I have now put it back in properly and there are no errors. The only thing that shows is the command "vsftpd" in the log file and on the screen. I run filezilla and connect with no error or lag. Just cannot do anything with that. I know you said that we were putting in a testing environment so that is to be expected. Now the next question, since the test environ worked, how do we translate that into the production environ?

  4. #74
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Progress!

    - Try the above command again, try to upload/download several files and see if the lag returns.

    - As for the system vsftpd installation, reset everything back to how it was. No /etc/pam.d/vsftpd-2. No /etc/resolv.conf.bak. Reset the contents of /etc/vsftpd/vsftpd.conf the one on your first post. Reset /etc/pam.d/vsftpd to it's defaults.

    - In /etc/vsftpd/vsftpd.conf add the following new line: seccomp_sandbox=no
    - Restart your system vsftpd
    - Try again with the system vsftpd and see if it works correctly now

  5. #75
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    Ok, I have done such and I get the delay.

  6. #76
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Please elaborate. Delay when using the
    - system vsftpd (/etc/vsftpd.conf and /etc/init.d/vsftpd)
    or when
    - using the /usr/bin/vsftpd -o... command as a normal user
    ?

  7. #77
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    the system vsftpd

    the system vsftpd gave the delay
    the command does NOT give a delay, but still does not allow for writing. Again, that is to be expected.
    Last edited by Herculeon; 02-20-2013 at 12:35 PM. Reason: neglected to give response about the command

  8. #78
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Quote Originally Posted by Herculeon View Post
    the command does NOT give a delay, but still does not allow for writing. Again, that is to be expected.
    Good that it does not delay. Make sure that there are no errors, that you see a directory listing *and* output in the terminal (post it here please).

    But it should also allow for writing under anonymous mode! Look at the switches run_as_launching_user, anon_upload_enable, anon_mkdir_write_enable and anon_other_write_enable in the latest command I gave you. We took this little read-only detour to avoid that weird 'it's root writable I am not serving FTP' attitude of vsftpd. But that problem went away when you switched to a non-root user. If you want to verify write access to the directory you are executing the vsftpd command, which is a requirement for writing through ftp to work. Go to the directory and do the following:

    Code:
    ls -lad .
    Should give you lines like:

    drwx-----x 44 user group 4096 feb 20 08:16 .
    The first characters should list 'drwx' like in the output above. This corresponds to the owner permissions, which is 'user' in our case. You can also write if it's 'd-wx' for example. But not list the directory contents. The later 3 characters '---' correspond to group 'group'. And the last 3 '--x' correspond to the rest of the world (excluding owner and group). As you can see, only the owner has full permissions (rwx = 7) and world is allow to travel across this directory (--x = 1).

    If you want to reset the permissions to allow only the user, do (don't do this /tmp, make temporary directory in /tmp!):

    Code:
    chmod 700 .
    And give it proper ownership:

    Code:
    chown user:group .
    Again, perform the above commands inside the directory you want to start vsftpd and write to. And substitute user:group with your settings. I think those were administrator:administrator? Setting the group is not strictly necessary (the name after the ':'), but it makes things more clear I think.

    Make sure that the user you run the command with, can write inside the very same directory in where you are executing the command.

  9. #79
    Just Joined!
    Join Date
    Jan 2013
    Posts
    61
    Here is the output:


    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,202,57).
    Command: LIST
    Response: 150 Here comes the directory listing.
    Response: 226 Transfer done (but failed to open directory).
    Status: Directory listing successful

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

  10. #80
    Linux Newbie
    Join Date
    Jun 2012
    Posts
    100
    Quote Originally Posted by Herculeon View Post
    Here is the output:
    Thank you .


    Quote Originally Posted by Herculeon View Post
    Command: PWD
    Response: 257 "/"
    It's requesting the current directory, which is root ('/'). Is this where you started your program? If not, try to navigate with the ftp client to the directory where you did (this should be possible). If the root directory is where you started your program, then something is really odd. Since your root was 'dr-xr-xr-x. 18 root root' (post #55).

    Quote Originally Posted by Herculeon View Post
    Response: 150 Here comes the directory listing.
    Response: 226 Transfer done (but failed to open directory).
    Status: Directory listing successful
    You are allowed to traverse the directory but not read it :/ . That would indicate a world (last three of 12) triplet of at least '--x'. So this could be '--x' or '-wx'. But your is 'r-x' according to your output. Really weird. If I compare the data you gave, I conclude that you should be able to read your root ('/') directory but not write. WEIRD

    Quote Originally Posted by Herculeon View Post
    [administrator@webforms retention]$ ls -lad
    drwxrwxrwx. 7 development ftp 4096 Feb 19 11:21 .
    [administrator@webforms retention]$
    That would be the directory you want to go to. You are probably starting vsftpd in / maybe? You should 'cd' to the above directory (drwxrwxrwx. 7 development ftp 4096 Feb 19 11:21 .) and THEN execute vsftpd (please).

    If I start vsftpd in '/home/gebruiker' and connect initially I get this:

    Quote Originally Posted by Rexilion's terminal
    Thu Feb 21 16:20:55 2013 [pid 14865] [ftp] FTP command: Client "127.0.0.1", "PWD"
    Thu Feb 21 16:20:55 2013 [pid 14865] [ftp] FTP response: Client "127.0.0.1", "257 "/home/gebruiker""

Page 8 of 12 FirstFirst ... 4 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
  •