Vsftpd работает странно

Автор: DDDstart Дата: 15.12.2007 22:31 Поднял ftp на основе vsftpd, при загрузке пользователем на ftp файла, он назад уже не скачивается.
Стал разбираться, оказалось, что при загрузке файл получает права 600, как только вручную ставлю права 655, все проходит нормально.

Когда закачивается следующий файл, ситуация повторяется.

Права на каталог /var/ftp/pub ftp:ftp 777
в vsftpd.conf local_umask=022
Re: vsftpd работает странно 15.12.2007 22:44DDDstart Раскопал на форуме ветку, такая же проблема и решена не была
[forum.asplinux.ru]
Re: vsftpd работает странно 15.12.2007 23:07BigAndy >в vsftpd.conf local_umask=022
Заставить перечитать /перезапустить демон.

>Поднял ftp на основе vsftpd, при загрузке пользователем на ftp файла, он назад уже не скачивается.
1) кем закачивается? ((локальныйм или удаленным пользователем)
2) кем скачивается? (тем же или другим пользователлем или анонимным)?

Изучите вот этот коментарий, может дальнейшие разъяснения не понадобятся
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022

В такой ситуации у нас все нормально.
Re: vsftpd работает странно 15.12.2007 23:26DDDstart BigAndy писал(а):

> Заставить перечитать /перезапустить демон.
перечитывал перезапускал
>

> 1) кем закачивается? ((локальныйм или удаленным пользователем)
локальным
> 2) кем скачивается? (тем же или другим пользователлем или
> анонимным)?
тем же

> Изучите вот этот коментарий, может дальнейшие разъяснения не
> понадобятся
> # Default umask for local users is 077. You may wish to change
> this to 022,
> # if your users expect that (022 is used by most other ftpd's)
> local_umask=022
>
ставил - не алё
Re: vsftpd работает странно 16.12.2007 00:12BigAndy Так, от шаманства переходим к ссистемному анализу. Улыбка

Что в логах пишет?
Что в dmesg |grep vsftp | grep EE
Re: vsftpd работает странно 16.12.2007 01:02DDDstart dmesg |grep vsftp | grep EE не говорит ничего
Что в dmesg |grep vsftp тоже не говорит ничего
dmesg говорит вот что
---
[root@asplin asp]# dmesg
Linux version 2.6.17-1.2157.1asp (build@amd64.asplinux.com.ua) (gcc version 4.0.
2 20051125 (Red Hat 4.0.2-8)) #1 Fri Aug 11 03:02:11 EEST 2006
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000000fff0000 (usable)
BIOS-e820: 000000000fff0000 - 000000000fff3000 (ACPI NVS)
BIOS-e820: 000000000fff3000 - 0000000010000000 (ACPI data)
BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
255MB LOWMEM available.
found SMP MP-table at 000f5b30
Using x86 segment limits to approximate NX protection
On node 0 totalpages: 65520
DMA zone: 4096 pages, LIFO batch:0
Normal zone: 61424 pages, LIFO batch:15
DMI 2.2 present.
ACPI: RSDP (v000 IntelR ) @ 0x000f77a0
ACPI: RSDT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff3000
ACPI: FADT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff3040
ACPI: MADT (v001 IntelR AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x0fff6c80
ACPI: DSDT (v001 INTELR AWRDACPI 0x00001000 MSFT 0x0100000c) @ 0x00000000
ACPI: PM-Timer IO Port: 0x408
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:2 APIC version 20
Using ACPI for processor (LAPIC) configuration information
Intel MultiProcessor Specification v1.1
Virtual Wire compatibility mode.
OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000
I/O APIC #2 Version 17 at 0xFEC00000.
Enabling APIC mode: Flat. Using 1 I/O APICs
Processors: 1
Allocating PCI resources starting at 20000000 (gap: 10000000:eec00000)
Built 1 zonelists
Kernel command line: root=/dev/hdc1 reboot=b pci=noacpi pci=usepirqmask quiet r
hgb resume=/dev/hdc5
mapped APIC to ffffd000 (fee00000)
mapped IOAPIC to ffffc000 (fec00000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c0783000 soft=c0784000
PID hash table entries: 1024 (order: 10, 4096 bytes)
Detected 2018.958 MHz processor.
Using pmtmr for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 254548k/262080k available (1998k kernel code, 6864k reserved, 1361k data
, 212k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 4042.22 BogoMIPS (lpj=8084442)
Security Framework v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 3febfbff 00000000 00000000 00000000 00000000
00000000 00000000
CPU: After vendor identify, caps: 3febfbff 00000000 00000000 00000000 00000000 0
0000000 00000000
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: After all inits, caps: 3febf3ff 00000000 00000000 00000080 00000000 0000000
0 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
CPU: Intel(R) Pentium(R) 4 CPU 2.00GHz stepping 04
Checking 'hlt' instruction... OK.
ACPI: setting ELCR to 1e20 (from 1c20)
ExtINT not setup in hardware but reported by MP table
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=0 pin2=0
checking if image is initramfs... it is
Freeing initrd memory: 520k freed
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: PCI BIOS revision 2.10 entry at 0xfb0d0, last bus=2
Setting up standard PCI resources
ACPI: Subsystem revision 20060127
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 13 devices
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 0400-047f claimed by ICH4 ACPI/GPIO/TCO
PCI quirk: region 0480-04bf claimed by ICH4 GPIO
Boot video device is 0000:01:00.0
PCI: Transparent bridge - 0000:00:1e.0
PCI: Using IRQ router PIIX/ICH [8086/2440] at 0000:00:1f.0
pnp: 00:02: ioport range 0x400-0x4bf could not be reserved
PCI: Bridge: 0000:00:01.0
IO window: 9000-9fff
MEM window: e4000000-e5ffffff
PREFETCH window: d0000000-dfffffff
PCI: Bridge: 0000:00:1e.0
IO window: a000-afff
MEM window: e6000000-e7ffffff
PREFETCH window: 20000000-200fffff
PCI: Setting latency timer of device 0000:00:1e.0 to 64
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 5, 131072 bytes)
TCP bind hash table entries: 4096 (order: 4, 81920 bytes)
TCP: Hash tables configured (established 8192 bind 4096)
TCP reno registered
apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)
apm: overridden by ACPI.
audit: initializing netlink socket (disabled)
audit(1197766593.260:1): initialized
Total HugeTLB memory allocated, 0
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux: Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 407A4C33B4DA055E
- User ID: ASPLinux, Ltd. (Kernel Module GPG key)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
ACPI: Fan [FAN] (on)
ACPI: Processor [CPU0] (supports 2 throttling states)
ACPI: Thermal Zone [THRM] (40 C)
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Real Time Clock Driver v1.12ac
Non-volatile memory driver v1.2
Linux agpgart interface v0.101 (c) Dave Jones
agpgart: Detected an Intel i845 Chipset.
agpgart: AGP aperture is 64M @ 0xe0000000
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH2: IDE controller at PCI slot 0000:00:1f.1
ICH2: chipset revision 5
ICH2: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:-DMA, hdb:pio
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:-DMA, hdd:-DMA
Probing IDE interface ide0...
hda: QUANTUM FIREBALLlct20 30, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: ST340016A, ATA DISK drive
hdd: TOSHIBA DVD-ROM SD-R1312, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 58633344 sectors (30020 MB-) w/418KiB Cache, CHS=58168/16/63, UDMA(33)
hda: cache flushes not supported
hda: hda1
hdc: max request size: 128KiB
hdc: 78165360 sectors (40020 MB-) w/2048KiB Cache, CHS=65535/16/63, UDMA(33)
hdc: cache flushes not supported
hdc: hdc1 hdc2 < hdc5 hdc6 > hdc3
hdd: ATAPI 40X DVD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
usbcore: registered new driver libusual
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
PNP: PS/2 Controller [PNP0303:-PS2K] at 0x60,0x64 irq 1
PNP: PS/2 controller doesn't have AUX irq; using default 12
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
TCP bic registered
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
swsusp: Resume From Partition /dev/hdc5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
ACPI wakeup devices:
SLPB PCI0 HUB0 USB0 USB1 MODM UAR1 UAR2
ACPI: (supports S0 S1 S5)
PM: Resume from disk failed.
Freeing unused kernel memory: 212k freed
Write protecting the kernel read-only data: 929k
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
input: AT Translated Set 2 keyboard as /class/input/input0
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
SELinux: Disabled at runtime.
SELinux: Unregistering netfilter hooks
audit(1197766597.040:2): selinux=0 auid=4294967295
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
0000:02:01.0: 3Com PCI 3c905C Tornado at d0832000.
8139too Fast Ethernet driver 0.9.27
eth1: RealTek RTL8139 at 0xd0834000, 00:80:48:30:81:42, IRQ 11
eth1: Identified 8139 chip type 'RTL-8100B/8139D'
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
hw_random: RNG not detected
USB Universal Host Controller Interface driver v3.0
PCI: Setting latency timer of device 0000:00:1f.2 to 64
uhci_hcd 0000:00:1f.2: UHCI Host Controller
uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:1f.2: irq 5, io base 0x0000b000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
PCI: Setting latency timer of device 0000:00:1f.4 to 64
uhci_hcd 0000:00:1f.4: UHCI Host Controller
uhci_hcd 0000:00:1f.4: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1f.4: irq 12, io base 0x0000b800
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-2: new low speed USB device using uhci_hcd and address 2
usb 1-2: configuration #1 chosen from 1 choice
input: Logitech Optical USB Mouse as /class/input/input1
input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-0000:00:1f.2-2
8139cp: 10/100 PCI Ethernet driver v1.2 (Mar 22, 2004)
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
swsusp: Resume From Partition 22:5
PM: Checking swsusp image.
PM: Resume from disk failed.
fglrx: module license 'Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERM
ANY' taints kernel.
[fglrx] Maximum main memory to use for locked dma buffers: 198 MBytes.
[fglrx] module loaded - fglrx 8.26.18 [Jun 22 2006] on minor 0
ACPI: Power Button (FF) [PWRF]
ACPI: Power Button (CM) [PWRB]
ACPI: Sleep Button (CM) [SLPB]
ibm_acpi: ec object not found
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
device-mapper: 4.6.0-ioctl (2006-02-17) initialised: dm-devel@redhat.com
loop: loaded (max 8 devices)
EXT3 FS on hdc1, internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS on hdc6, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on hdc3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 1028120k swap on /dev/hdc5. Priority:-1 extents:1 across:1028120k
IA-32 Microcode Update Driver: v1.14 <tigran@veritas.com>
microcode: CPU0 updated from revision 0xb to 0x1e, date = 06052003
eth0: setting full-duplex.
audit(1197755824.595:3): audit_pid=1759 old=0 by auid=4294967295
eth1: link down
ADDRCONF(NETDEV_UP): eth1: link is not ready
Bluetooth: Core ver 2.8
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.8
Bluetooth: L2CAP socket layer initialized
Bluetooth: HIDP (Human Interface Emulation) ver 1.1
eth0: no IPv6 routers present
---
Re: vsftpd работает странно 16.12.2007 01:40BigAndy >dmesg |grep vsftp | grep EE не говорит ничего
>Что в dmesg |grep vsftp тоже не говорит ничего
Это хорошо, значит ничего не падает.

Ну, теперь включаем отладку на полуную и смотрим логи vsftpd, где вы их положили. Только не постьте сюда логи полностью- это заведомо их никто разбирать не будет...Кладите только значимые цитаты.
Re: vsftpd работает странно 16.12.2007 03:59DDDstart Вот что сказал при попытке закачать файл test11111.jpg - он закачался, а скачать потом нельзя, равно как и удалить
---
Sun Dec 16 00:47:29 2007 1 10.64.0.103 780461 /pub/test11111.jpg b _ i a IEUser@ ftp 0 * c
Sun Dec 16 00:47:36 2007 1 10.64.0.103 0 /pub/test11111.jpg b _ o a IEUser@ ftp 0 * i
Sun Dec 16 00:53:24 2007 1 10.64.0.103 780461 /pub/ddd/ddd/test11111.jpg b _ i a IEUser@ ftp 0 * c
Sun Dec 16 00:53:35 2007 1 10.64.0.103 780461 /pub/ddd/test11111.jpg b _ i a IEU ser@ ftp 0 * c
Sun Dec 16 00:53:46 2007 1 10.64.0.103 0 /pub/ddd/test11111.jpg b _ o a IEUser@ ftp 0 * i
---

При закачке файл автоматом получает права 100600 (почему 6 знаков!?),
а все закачиваемые __каталоги__ получают права 40700
RSS-материал