Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've configured my suse guest os to run a webserver and a ftp but I can't open a ftp connection from my host. I can only open a http connection. My ftp client gives me:

 STATUS:>   [26.04.2012 13:15:20] Liste "" wird abgerufen...
 STATUS:>   [26.04.2012 13:15:20] Verbindung zum FTP-Server wird hergestellt...         
 192.168.92.128:21 (ip = 192.168.92.128)...
 STATUS:>   [26.04.2012 13:15:20] Socket verbunden. Warte auf Willkommensnachricht...
    [26.04.2012 13:15:20] 500 OOPS: could not bind listening IPv6 socket
 FEHLER:>   [26.04.2012 13:15:20] Syntaxfehler: Befehl nicht erkannt.

netstat -a on my guest os gives me this:

 Proto Recv-Q Send-Q Local Address           Foreign Address         State      
 tcp        0      0 *:mysql                 *:*                     LISTEN      
 tcp        0      0 *:ftp                   *:*                     LISTEN      
 tcp        0      0 localhost:ipp           *:*                     LISTEN      
 tcp        0      0 localhost:ipp           *:*                     LISTEN      
 udp        0      0 *:mdns                  *:*                                 
 udp        0      0 *:56897                 *:*                                  
 udp        0      0 *:27213                 *:*                                 
 udp        0      0 *:ipp                   *:*                                 
 udp        0      0 *:34000                 *:*                                 
 udp        0      0 *:dhcpv6-client         *:*  

How can I know what credentials I need to enter to connect with my ftp server? When I open a ftp session with anonymous it gives me this error:

STATUS:>    [26.04.2012 13:48:18] Liste "" wird abgerufen...
STATUS:>    [26.04.2012 13:48:18] Verbindung zum FTP-Server wird hergestellt...       
192.168.92.128:21 (ip = 192.168.92.128)...
STATUS:>    [26.04.2012 13:48:18] Socket verbunden. Warte auf Willkommensnachricht...
    [26.04.2012 13:48:18] 220 Willkommensnachricht
STATUS:>    [26.04.2012 13:48:18] Verbunden. Authentifizierung läuft...
BEFEHL:>    [26.04.2012 13:48:18] USER anonymous
    [26.04.2012 13:48:18] 331 Please specify the password.
BEFEHL:>    [26.04.2012 13:48:18] PASS *****
    [26.04.2012 13:48:18] 500 OOPS: vsftpd: refusing to run with writable root 
inside chroot()
share|improve this question
1  
That last "OOPS" is requiring you, as the ftp site administrator, to change permissions on the root of the ftp site in your openSUSE guest. You can apply chmod a-w to it. After that you'll want to try again and report back if you reach further difficulties. –  minopret Apr 26 '12 at 12:02
    
I run chmod -R a-w htdocs/ and it works! Thank you! –  Phpdna Apr 26 '12 at 12:17
    
@minopret: But chmod a-w doesn't allow write access!? I need write access with my ftp client? –  Phpdna Apr 26 '12 at 12:20
1  
It shouldn't be necessary to remove write permission on the entire site. It is necessary to remove write permission on the top directory of the site (no -R option). –  minopret Apr 26 '12 at 12:22
    
You are right. Thanks again! –  Phpdna Apr 26 '12 at 12:36

1 Answer 1

up vote 1 down vote accepted

That last "OOPS" is requiring you, as the ftp site administrator, to change permissions on the root of the ftp site in your openSUSE guest. You can apply chmod a-w to it. It is only necessary to remove write permission on the top directory of the site (no -R option)

share|improve this answer
    
But how can I upload in my root folder when I need to remove my write permissions? –  Phpdna Apr 27 '12 at 13:46
    
It's better practice to create a subdirectory where you can upload. The purpose of the chroot is to prevent any ftp account from tampering with the programs that ftp allows them to execute, even if that account is in the hands of an intruder who has stolen or cracked the account credentials. Permitting anyone to upload to your root folder, even yourself, would defeat that purpose. –  minopret Apr 27 '12 at 16:13
    
Do you mean chroot() that he/she can use path traversal to change to root or other folders? I don't really need it. Is there a workaround? –  Phpdna Apr 27 '12 at 16:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.