Bug 264676

Summary: Yast-FTP Server destroyed all my permissions !
Product: [openSUSE] openSUSE 10.3 Reporter: Alexey Eremenko <al4321>
Component: YaST2Assignee: Jozef Uhliarik <juhliarik>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P5 - None    
Version: Alpha 3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs openSUSE Alpha 3
/etc/xinetd.conf
/etc/pure-ftpd/pure-ftpd.conf
rpmlist.txt - list of all installed software on my 10.3a3 testbed
/etc/passwd
/etc/vsftpd.conf
/etc/xinetd.d/vsftpd

Description Alexey Eremenko 2007-04-14 21:30:28 UTC
serious bug:
When I shared my wallpaper's folder, this module changed all my permissions !

I have setup FTP Server for: /home/tux/.kde/share/wallpaper and you know what?
This module destroyed all my previous permissions and replaced them with user=ftp, group=ftp - not only in that specific folder, but in whole /home/tux folder and all sub-folders - unbelievable !!!!

Fortunately, this was a VirtualBox VM :)

I have shared this with the newly introduced Yast-FTP Server, as anonymous user with upload rights, using the pure-ftp-d backend.

Overall: This is very important step to introduce FTP Server into Yast, keep up the good work !

OS: openSUSE 10.3, Alpha 3, x86.

-Alexey "Technologov"
Comment 1 Matej Horvath 2007-04-16 09:02:25 UTC
Please attach your yast logs.

http://en.opensuse.org/Bugs/YaST
Comment 2 Alexey Eremenko 2007-04-16 15:07:04 UTC
Created attachment 131457 [details]
y2logs openSUSE Alpha 3
Comment 3 Jozef Uhliarik 2007-04-25 07:51:45 UTC
First: I ma sorry that you lost your permissions and my late reaction. I hope that you lost only permissions.

Next: Could you send me your config file: /etc/pure-ftpd/pure-ftpd.conf (without your private settings e.g. IP...) I also interested in your settings for pure-ftpd in inetd or xinetd. Could you send me this information?

My opinion is that you have virtual user for pure-ftpd and last version of ftp-server doesn't support it now. :( Yes I know it is not cause for lost permossions. I will try to do patch for this problem but first I need your exact settings for pure-ftpd. 
Comment 4 Alexey Eremenko 2007-04-26 16:39:25 UTC
Created attachment 135209 [details]
/etc/xinetd.conf
Comment 5 Alexey Eremenko 2007-04-26 16:40:22 UTC
Created attachment 135210 [details]
/etc/pure-ftpd/pure-ftpd.conf
Comment 6 Jozef Uhliarik 2007-04-27 07:34:02 UTC
Thank you for your config files. If you use xinetd for running pure-ftpd I need next file /etc/xinetd.d/pure-ftpd. Could you send me it please? 
There are your settings for the pure-ftpd. 
I am working on your problem with ftp-server and I want to test your settings.
Comment 7 Alexey Eremenko 2007-04-27 07:49:31 UTC
Hmmm.. that's a difficult ask... mainly due to the fact that I have no pure-ftp-d installed. he he.

Look here:

alexey@suse103a3:~> rpm -qa | sort | grep -i ftp
lukemftp-1.5-629
tftp-0.48-8
vsftpd-2.0.5-43
yast2-ftp-server-2.15.0-2
yast2-tftp-server-2.14.0-30

and here:

suse103a3:/etc/xinetd.d # ls
chargen      daytime      echo      sane-port  systat  time-udp
chargen-udp  daytime-udp  echo-udp  servers    telnet  vnc
cups-lpd     discard      netstat   services   tftp    vsftpd
cvs          discard-udp  rsync     swat       time

Still, the file pureftp exists, look here:

suse103a3:/etc/xinetd.d # ls .. | grep ftp
ftpusers
pure-ftpd
vsftpd.conf

Do you see the problems ?

1. yast-ftp-server started without requiring me to setup pure-ftpd first.
2. It destroyed my permissions, even with no ftp server in existence.
3. It used "ftp" user and group. Maybe from vsftp server?
4. pure-ftpd config file in "/etc" directory was probably created by yast-ftp-server, not by RPM, despite the fact I have no pureftpd server installed.

-Alexey "Technologov"
Comment 8 Jozef Uhliarik 2007-05-02 10:45:59 UTC
O.K.

My fault I didn't ask you first important questions... (about your daemons for ftp, version of yast2-ftp-server...)

I did correction for starting yast2-ftp-server (choosing correct ftp daemon) some times ago. Last version 2.15.2 of yast2-ftp-server includes it.

Answers for your points:

1.-2. yast2-ftp-server did change in home dir for "ftp" user. It is case why you lost your permissions. Another settings were written into /etc/pure-ftpd/pure-ftpd.conf without effect for vsftpd.
3. Yes yast2-ftp-server uses "ftp" user for configuration home dir for anonymous connections.
4. Yes but without effect for your vsftpd settings except changed home dir for "ftp" user. :(

Some facts:

yast2-ftp-server configures wrong daemon - fixed
yast2-ftp-server changes "ftp" user (home dir) only if you used pure-ftpd - fixed
yast2-ftp-server don't support virtual users.

Next:
I wuold like do patch for your problem. The best way is if you write me (send me) your correct settings for using FTP. Could you write me your correct settings for using FTP please.

I interested in:

- ftp daemon (probably vsftpd-2.0.5-43)
- config file for ftp daemon
- virtual users
- settings for anonymous connections (my special interest)

Thank you for your reports.

Jozef
Comment 9 Alexey Eremenko 2007-05-02 16:01:53 UTC
Created attachment 137045 [details]
rpmlist.txt - list of all installed software on my 10.3a3 testbed
Comment 10 Alexey Eremenko 2007-05-02 16:03:15 UTC
Created attachment 137048 [details]
/etc/passwd
Comment 11 Alexey Eremenko 2007-05-02 16:06:36 UTC
Created attachment 137051 [details]
/etc/vsftpd.conf
Comment 12 Alexey Eremenko 2007-05-02 16:07:32 UTC
Created attachment 137052 [details]
/etc/xinetd.d/vsftpd
Comment 13 Alexey Eremenko 2007-05-02 16:09:31 UTC
Unfortunately, I don't know how-to fulfill "your special interest" - which files to upload or which info to give?
Comment 14 Jozef Uhliarik 2007-05-03 14:08:03 UTC
My special interest was about option "ftp_username" from /etc/vsftpd.conf and user info defined in this option.

(for example: ftp_username=ftp and line from /etc/shadow for "ftp" user)

By the way I did correction for your problem. :)

Thank you for your patient and help.

New version of yast2-ftp-server 2.15.3 includes patch.

Have a nice day.

Jozef