Saratov Linux User Group
 help / color / mirror / Atom feed
* [Sarlug] FreeBSD ftpd
@ 2009-02-19 18:41 Солмин Владимир
  2009-02-20  6:58 ` Alexander Grigoriev
  0 siblings, 1 reply; 6+ messages in thread
From: Солмин Владимир @ 2009-02-19 18:41 UTC (permalink / raw)
  To: Saratov Linux User Group Maillist

Объясните мне плиз кто нибудь... Всю голову сломал.
Есть FreeBSD 6.3
На ней поднят ftp сервер на стандартном ftpd
Стандартная строка в /etc/inet.conf выглядит так:

/etc/inetd.conf:
ftp     stream  tcp     nowait  root    /usr/libexec/ftpd     ftpd -l

Я изменил на:
ftp     stream  tcp     nowait  root    /usr/libexec/ftpd.sh

написал парсер:
/usr/libexec/ftpd.sh:

#!/bin/sh
TZ=Europe/Moscow
export TZ
/usr/libexec/ftpd -l -l

Сделано это для того что бы ftpd получал нормальные сведения о
временной зоне. Как выяснилось если экспорт переменной TZ не делать то
временную зону ftpd не видит.

Ну как бы всё нормально всё работает.. НО!

Какая то свистопляска с правами.

смотрим...
[root@info /usr/ftp]# ls -l
total 3
-rw-r--r--  file1 root  wheel    5 19 фев 22:25 1

видим есть файл file1 для записи рутом, всем остальным для чтения.

заходим по фтп в этот каталог пользователем не входящим в группу wheel
и естественно не являющимся root-ом.

И... ЛЕГКО УДАЛЯЕМ:
C:\ftp
ftp> open ftp.syzranhands.ru
Связь с ftp.syzranhands.ru.
220 info.syzranhands.ru FTP server (Version 6.00LS) ready.
Пользователь (ftp.syzranhands.ru:(none)): 123
331 Password required for 123.
Пароль:
230 User 123 logged in, access restrictions apply.
ftp> ls -l
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 4
-rw-r--r--  1 1013  1014  158 Feb 19 21:07 .login_conf
-rw-r--r--  1 0     0       5 Feb 19 21:25 file1
226 Transfer complete.
ftp: 111 байт получено за 0,00 (сек) со скоростью 111000,00 (КБ/сек).
ftp> dele file1
250 DELE command successful.
ftp> ls -l
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 2
-rw-r--r--  1 1013  1014  158 Feb 19 21:07 .login_conf
226 Transfer complete.
ftp: 65 байт получено за 0,00 (сек) со скоростью 65000,00 (КБ/сек).
ftp> quit
221 Goodbye.

Внимание вопрос) ПОЧЕМУ?))))


-- 
С уважением,
 Солмин                          mailto:solmin@mail.ru



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-20 11:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-19 18:41 [Sarlug] FreeBSD ftpd Солмин Владимир
2009-02-20  6:58 ` Alexander Grigoriev
2009-02-20  7:39   ` Солмин Владимир
2009-02-20  9:00     ` Alexander Grigoriev
2009-02-20  9:53       ` Sve
2009-02-20 11:01         ` Aleksei Sinitsyn

Saratov Linux User Group

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sarlug/0 sarlug/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sarlug sarlug/ http://lore.altlinux.org/sarlug \
		sarlug@lists.lug.ru sarlug@lug.ru
	public-inbox-index sarlug

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sarlug


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git