76

Odp: Problem z logowaniem do ftp

OK. Z konfiguracją użytkowników sabek i iwka sobie poradziłem i otwiera mi się na /mnt/sda3/ gdzie sa katalogi publiczny i prywatny.
A użytkownik anonimowy wchodzi na chroot. Chodzi o dodanie mu praw dostępu do poszczególnych katalogów czy trzeba mu jakoś inaczej ustawić katalog domowy?

77

Odp: Problem z logowaniem do ftp

W konfiguracji to robisz przecież. Jaki katalog domowy dla ftpa dałeś?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

78 (edytowany przez gonzales 2013-04-18 19:47:15)

Odp: Problem z logowaniem do ftp

Teraz zmieniłem i dałem publiczny i ten mi się otwiera.
Ale chcę zmienić tak jak jest dla dwóch pozostałych użytkowników czyli /mnt/sda3/

tzn. pomimo wpisów jak niżej logowanie poprzez sabek i iwka wyświetla i publiczny i prywatny no i lost+found.

Konfig (passwd) wygląda tak:

root:x:0:0:root:/root:/bin/ash
daemon:*:1:1:daemon:/var:/bin/false
network:*:101:101:network:/var:/bin/false
nobody:*:65534:65534:nobody:/var:/bin/false

sabek:x:1000:65534:sabek:/tmp:/bin/ash
sabek:x:1000:65534:sabek:/mnt/sda3/publiczny:/bin/false

iwka:x:1001:65534:iwka:/tmp:/bin/false
iwka:x:1000:65534:iwka:/mnt/sda3/publiczny:/bin/false

ftp:*:55:55:ftp:/mnt/sda3/publiczny:/bin/false

79

Odp: Problem z logowaniem do ftp

sabek:x:1000:65534:sabek:/tmp:/bin/ash
sabek:x:1000:65534:sabek:/mnt/sda3/publiczny:/bin/false
iwka:x:1001:65534:iwka:/tmp:/bin/false
iwka:x:1000:65534:iwka:/mnt/sda3/publiczny:/bin/false

To jest źle. Tylko jeden użytkownik o danej nazwie może być w passwd.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

80

Odp: Problem z logowaniem do ftp

Znaczy się albo sabek albo iwka

czy albo
sabek:x:1000:65534:sabek:/tmp:/bin/ash
albo
sabek:x:1000:65534:sabek:/mnt/sda3/publiczny:/bin/false

bo zaczynam się coraz bardziej "zakręcać"?

81

Odp: Problem z logowaniem do ftp

Jeden wpis dla użytkownika. Tylko jeden. I katalog taki jak chcesz oczywiście.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

82 (edytowany przez gonzales 2013-04-18 20:45:27)

Odp: Problem z logowaniem do ftp

Dobra teraz mam tak.
root:x:0:0:root:/root:/bin/ash
daemon:*:1:1:daemon:/var:/bin/false
network:*:101:101:network:/var:/bin/false
nobody:*:65534:65534:nobody:/var:/bin/false

sabek:x:1000:65534:sabek:/tmp:/bin/ash

iwka:x:1000:65534:iwka:/mnt/sda3/:/bin/false

ftp:*:55:55:ftp:/mnt/sda3/:/bin/false

czyli tak jak chciałem tzn. wszyscy użytkownicy logują się do tego samego miejsca (katalogu domowego).


Ponieważ trochę sobie poklikałem to teraz takie pytanka:
1.
:/bin/false
oznacza użytkowników bez możliwości logowania?
2.
:/bin/ash
oznacza użytkowników z możliwości logowania?
3.
i przy iwka i ftp mam podaną ścieżkę czyli:
/mnt/sda3/
to w takim razie co oznacza /tmp przy sabku skoro wszyscy logują się do tego samego miejsca?


Cezary nie denerwuj się tylko wink

83

Odp: Problem z logowaniem do ftp

1. Oznacza że user nie ma zdefiniowanej powłoki i przez ssh się nie zaloguje
2. Że ma i jak jest hasło to się zaloguje
3. Jego katalog domowy. Jak się logujesz na niego do ftp to w jakim katalogu Ci ten user ląduje?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

84

Odp: Problem z logowaniem do ftp

Ad. 1
mogę zmienić na ash?

Ad. 3
Ląduje tam gdzie inni czyli /mnt/sda3/

OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_delay.c:1655
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth.c:129
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): opening scoreboard '/var/proftpd.scoreboard'
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:131
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): connected - local  : 192.168.1.1:21
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): connected - remote : 192.168.1.185:7244
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): FTP session opened.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER iwka' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER iwka' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER iwka' to mod_delay
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER iwka' to mod_auth
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'USER iwka' to mod_auth
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'USER iwka' to mod_delay
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'USER iwka' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): retrieved UID 1000 for user 'iwka'
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): retrieved group ID: 65534
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): retrieved group name: nogroup
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth_unix.c:467
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth_unix.c:548
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): user 'iwka' authenticated by mod_auth_unix.c
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at auth.c:1269
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at auth.c:1271
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): USER PRIVS 1000 at mod_auth.c:1135
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:1137
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): Config for OpenWrt ftp server:
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ~ftp/
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):  UserName
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):  GroupName
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):  UserAlias
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):  MaxClients
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):  Umask
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):  AllowOverwrite
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): Limit
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]):  DenyAll
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): DefaultServer
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): Umask
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): UserID
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): UserName
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): GroupID
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): GroupName
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): DefaultRoot
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): AllowOverwrite
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth.c:1225
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): opening TransferLog '/var/log/xferlog'
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): setting group ID: 65534
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:1265
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): USER PRIVS 1000 at mod_auth.c:667
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:671
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): Preparing to chroot to directory '/mnt/sda3'
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at auth.c:1383
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at auth.c:1385
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): Environment successfully chroot()ed
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth.c:1306
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): SETUP PRIVS at mod_auth.c:1318
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_delay
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_ls
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:1680
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_xfer
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PASS (hidden)' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): USER iwka: Login successful.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'SYST' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'SYST' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'SYST' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'SYST' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'FEAT' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'FEAT' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'FEAT' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'FEAT' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PWD' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PWD' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'PWD' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PWD' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'TYPE I' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'TYPE I' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'TYPE I' to mod_xfer
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'TYPE I' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASV' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASV' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'PASV' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): Entering Passive Mode (192,168,1,1,168,179).
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PASV' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'MLSD' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'MLSD' to mod_core
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'MLSD' to mod_facts
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): passive data connection opened - local  : 192.168.1.1:43187
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): passive data connection opened - remote : 192.168.1.185:7245
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/prywatny', fullpath = '/mnt/sda3/prywatny'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/publiczny', fullpath = '/mnt/sda3/publiczny'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/lost+found', fullpath = '/mnt/sda3/lost+found'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'MLSD' to mod_log
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'MLSD' to mod_facts
OpenWrt proftpd[2880] openwrt: scrubbing scoreboard
OpenWrt proftpd[2880] openwrt: ROOT PRIVS at scoreboard.c:1369
OpenWrt proftpd[2880] openwrt: RELINQUISH PRIVS at scoreboard.c:1372
^COpenWrt proftpd[2884] openwrt (192.168.1.185[192.168.1.185]): ProFTPD terminating (signal 2)
OpenWrt proftpd[2884] openwrt (192.168.1.185[192.168.1.185]): FTP session closed.
OpenWrt proftpd[2883] openwrt (192.168.1.185[192.168.1.185]): ProFTPD terminating (signal 2)
OpenWrt proftpd[2883] openwrt (192.168.1.185[192.168.1.185]): FTP session closed.
OpenWrt proftpd[2880] openwrt: ProFTPD terminating (signal 2)
OpenWrt proftpd[2880] openwrt: ROOT PRIVS at main.c:2074
OpenWrt proftpd[2880] openwrt: ROOT PRIVS at mod_delay.c:1531
OpenWrt proftpd[2880] openwrt: RELINQUISH PRIVS at mod_delay.c:1536
OpenWrt proftpd[2880] openwrt: RELINQUISH PRIVS at main.c:2099
OpenWrt proftpd[2880] openwrt: ProFTPD 1.3.4b standalone mode SHUTDOWN
OpenWrt proftpd[2880] openwrt: ROOT PRIVS at main.c:2106
OpenWrt proftpd[2880] openwrt: deleting existing scoreboard '/var/proftpd.scoreboard'
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): ProFTPD terminating (signal 2)
OpenWrt proftpd[2885] openwrt (192.168.1.185[192.168.1.185]): FTP session closed.
OpenWrt proftpd[2880] openwrt: RELINQUISH PRIVS at main.c:2108

85

Odp: Problem z logowaniem do ftp

I gdzie tu masz logowanie użytkownika sabek?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

86 (edytowany przez gonzales 2013-04-18 21:06:43)

Odp: Problem z logowaniem do ftp

Upsss... znowu wtopa.
Teraz już jest:

OpenWrt proftpd[2917] openwrt: RELINQUISH PRIVS at pidfile.c:49
OpenWrt proftpd[2920] openwrt: ROOT PRIVS at main.c:1272
OpenWrt proftpd[2920] openwrt: RELINQUISH PRIVS at main.c:1276
OpenWrt proftpd[2920] openwrt: no matching vhost found for 192.168.1.1#21, using 'OpenWrt ftp server' listening on wildcard address
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at main.c:1087
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): SETUP PRIVS at main.c:1092
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): session requested from client in unknown class
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): performing module session initializations
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): mod_ident/1.0: ident lookup disabled
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_delay.c:1650
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_delay.c:1655
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth.c:129
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): opening scoreboard '/var/proftpd.scoreboard'
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:131
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): connected - local  : 192.168.1.1:21
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): connected - remote : 192.168.1.185:7424
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): FTP session opened.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER sabek' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER sabek' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER sabek' to mod_delay
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'USER sabek' to mod_auth
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'USER sabek' to mod_auth
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'USER sabek' to mod_delay
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'USER sabek' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_delay
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): retrieved UID 1000 for user 'sabek'
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): retrieved group ID: 65534
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): retrieved group name: nogroup
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth_unix.c:467
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth_unix.c:548
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): user 'sabek' authenticated by mod_auth_unix.c
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at auth.c:1269
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at auth.c:1271
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): USER PRIVS 1000 at mod_auth.c:1135
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:1137
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): Config for OpenWrt ftp server:
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ~ftp/
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):  UserName
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):  GroupName
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):  UserAlias
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):  MaxClients
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):  Umask
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):  AllowOverwrite
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): Limit
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]):  DenyAll
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): DefaultServer
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): Umask
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): UserID
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): UserName
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): GroupID
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): GroupName
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): DefaultRoot
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): AllowOverwrite
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth.c:1225
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): opening TransferLog '/var/log/xferlog'
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): setting group ID: 65534
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:1265
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): USER PRIVS 1000 at mod_auth.c:667
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:671
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): Preparing to chroot to directory '/mnt/sda3'
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at auth.c:1383
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at auth.c:1385
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): Environment successfully chroot()ed
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): ROOT PRIVS at mod_auth.c:1306
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): SETUP PRIVS at mod_auth.c:1318
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): unable to chdir to /tmp (No such file or directory), defaulting to chroot directory /mnt/sda3
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_delay
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_ls
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): RELINQUISH PRIVS at mod_auth.c:1680
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_xfer
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching POST_CMD command 'PASS (hidden)' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PASS (hidden)' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PASS (hidden)' to mod_auth
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): USER sabek: Login successful.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'SYST' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'SYST' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'SYST' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'SYST' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'FEAT' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'FEAT' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'FEAT' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'FEAT' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PWD' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PWD' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'PWD' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PWD' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'TYPE I' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'TYPE I' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'TYPE I' to mod_xfer
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'TYPE I' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASV' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'PASV' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'PASV' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): Entering Passive Mode (192,168,1,1,165,102).
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'PASV' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'MLSD' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching PRE_CMD command 'MLSD' to mod_core
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching CMD command 'MLSD' to mod_facts
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): passive data connection opened - local  : 192.168.1.1:42342
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): passive data connection opened - remote : 192.168.1.185:7425
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/prywatny', fullpath = '/mnt/sda3/prywatny'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/publiczny', fullpath = '/mnt/sda3/publiczny'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/lost+found', fullpath = '/mnt/sda3/lost+found'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): in dir_check_full(): path = '/', fullpath = '/mnt/sda3/'.
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'MLSD' to mod_log
OpenWrt proftpd[2920] openwrt (192.168.1.185[192.168.1.185]): dispatching LOG_CMD command 'MLSD' to mod_facts
OpenWrt proftpd[2917] openwrt: scrubbing scoreboard
OpenWrt proftpd[2917] openwrt: ROOT PRIVS at scoreboard.c:1369
OpenWrt proftpd[2917] openwrt: RELINQUISH PRIVS at scoreboard.c:1372
OpenWrt proftpd[2917] openwrt: scrubbing scoreboard
OpenWrt proftpd[2917] openwrt: ROOT PRIVS at scoreboard.c:1369
OpenWrt proftpd[2917] openwrt: RELINQUISH PRIVS at scoreboard.c:1372

87

Odp: Problem z logowaniem do ftp

Coś namieszałeś z konfigiem

Preparing to chroot to directory '/mnt/sda3'
unable to chdir to /tmp (No such file or directory), defaulting to chroot directory /mnt/sda3

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

88 (edytowany przez gonzales 2013-04-18 21:29:12)

Odp: Problem z logowaniem do ftp

Chodzi Ci o proftpd.conf?

ServerName        "OpenWrt ftp server"
ServerType        standalone
DefaultServer        on
Port                21
UseIPv6            off
Umask            022
MaxInstances        10
User                nobody
Group            nogroup
DefaultRoot             /mnt/sda3
AllowOverwrite        on

<Limit SITE_CHMOD>
  DenyAll
</Limit>

<Anonymous ~ftp>
  User            ftp
  Group            ftp
  UserAlias        anonymous ftp
  MaxClients        10
</Anonymous>

89

Odp: Problem z logowaniem do ftp

DefaultRoot             /mnt/sda3

Ustawiłeś taki domyślny root. Więc to co jest w użytkowników jest ignorowane. A później się dziwisz że nie chce działać smile

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

90

Odp: Problem z logowaniem do ftp

Nie, nie, to nie tak. Nie dziwię się, że coś nie chce działać. Jest tak jak chciałem, próbuję tylko to zrozumieć.
Jeżeli dałem użytkownikom iwka i ftp takie ustawienia:

iwka:x:1000:65534:iwka:/mnt/sda3/publiczny:/bin/false
ftp:*:55:55:ftp:/mnt/sda3/publiczny:/bin/false

to "wchodzili" właśnie do katalogu publiczny.
Nie wiem tylko dlaczego iwka mogła wyjść poziom wyżej czyli miała też dostęp do katalogu prywatny a użytkownik ftp przy takich samych ustawieniach nie może wyjść poziom wyżej. W związku z czym zmieniłem to tak jak jest w poście 82 i wszyscy wchodzą w to samo miejsce.

91

Odp: Problem z logowaniem do ftp

Wywal ten default root  z konfiga, bazuj na tym co ma user wpisane w katalogu domowym. Ustaw DefaultRoot ~ będzie chrootowany w swoim domowym katalogu.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

92

Odp: Problem z logowaniem do ftp

OK. O efektach dam znać nocą wink

93

Odp: Problem z logowaniem do ftp

Ustawienia w  proftpd.conf zmienione na zalecane a konfigurację katalogu domowego dla poszczególnych użytkowników będę robił w passwd.
Działa tak jak powinno. big_smile
Cezary dzięki za wsparcie. Zresztą jak zawsze.
Teraz czas na OpenVPN ale razem z VLAN-ami. Cokolwiek to jest wink