我想達到的功能:
"blue1" "blue2" "blue3" 登入時,進入/home/ftp/目錄,可以在/home/ftp/Upload目錄上載,不使用 Anonymous
以下是我的設定:
- 代碼: 選擇全部
ServerName "Power by ProFTPD"
ServerType standalone
DeferWelcome off
ServerAdmin blue_119@seed.net.tw
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
AllowOverwrite on
AllowStoreRestart on
RootLogin off
RequireValidShell off
MaxClients 10 "Sorry,Max %m users -- try again later"
MaxClientsPerHost 1 "Too Many User (Limit=%m)"
MaxLoginAttempts 3
TimeoutNoTransfer 60
TimeoutStalled 300
TimeoutIdle 300
DisplayLogin welcome.msg
DisplayFirstChdir .message
ListOptions "-l"
DefaultRoot /home/ftp
DenyFilter \*.*/
Port 21
MaxInstances 10
User nobody
Group nogroup
<Directory /*>
AllowOverwrite on
</Directory>
<Directory /home/ftp/Upload>
<Limit STOR>
AllowAll
</Limit>
</Directory>
而/home/ftp內的目錄:
目錄架構
[/home/ftp]
.
`-- Upload
權限都是755
之後新增一個id
useradd -g ftp -s /bin/false blue1
使用blue1登入後,能正常進入/home/ftp,但進入Upload後,上載資料,郤說「權根」不足 但我在proftpd.conf裡不是已設了
- 代碼: 選擇全部
<Directory /home/ftp/Upload>
<Limit STOR>
AllowAll
</Limit>
</Directory>
為什麼還不能呢
如把Update權限改為775,就沒問題 ><"
但這是因為blue1在ftp的群主裡,這樣proftpd.conf好像沒發揮到權限控制的功能
如加入Anonymous的設定,以Anonymous換入,就沒問題可以正常做到權限控制,以下是我加入的Anonymous內容
- 代碼: 選擇全部
<Anonymous ~ftp>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
<Directory Upload>
Umask 022 022
<Limit READ WRITE>
DenyAll
</Limit>
<Limit STOR>
AllowAll
</Limit>
</Directory>
</Anonymous>
請大大指點,弟因如何解決問題呢 ><"