# 1. 先用 vbird 的身份登陆 vsftpd 看看:
[root@www ~]# ftp localhost
Connected to [url=http://www.vbird.tsai.]www.vbird.tsai.[/url]
Name (localhost:root): vbird
331 Please specify the password.
Password: <==这里输入 vbird 的口令喔!
500 OOPS: cannot change directory:/home/vbird
Login failed. <==见鬼了!竟然无法登陆自己的家目录 /home/vbird 哩!
ftp> bye
[root@www ~]# ls -ld /home/vbird
drwx------ 4 vbird vbird 4096 8月 18 18:22 /home/vbird
# 权限明明是对的嘛!怎么会无法切换?
# 2. 看看登录档有没有什么重要信息的说明:
[root@www ~]# tail /var/log/messages
Sep 11 16:57:31 www setroubleshoot: SELinux is preventing the ftp daemon from
reading users home directories (/). For complete SELinux messages. run
sealert -l b8bdaf2d-b083-4e28-9465-91fae8df63b1
# 3. 照著作一下:
[root@www ~]# sealert -l b8bdaf2d-b083-4e28-9465-91fae8df63b1
Summary:
SELinux is preventing the ftp daemon from reading users home directories (/).
....(中间省略)....
The following command will allow this access:
setsebool -P ftp_home_dir=1
....(底下省略)....
6、好了,现在让我们处理一下上面的 vsftpd 相关的守则吧!因为是守则挡住了用户的登陆了!
[AppleScript] ı鿴ƴ
[root@www ~]# setsebool -P ftp_home_dir=1
[root@www ~]# ftp localhost
Connected to [url=http://www.vbird.tsai.]www.vbird.tsai.[/url]
Name (localhost:root): vbird
331 Please specify the password.
Password:
230 Login successful. <==看吧!顺利登陆罗!
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
简答题部分
简单说明什么是程序 (program) 而什么是程序 (process)?
程序 (program) 是系统上面可以被运行的文件,由於 Linux 的完整档名 (由 / 写起) 仅能有一个, 所以 program 的档名具有单一性。当程序被运行后,就会启动成程序 (process), 一个 program 可以被不同的使用者或者相同的使用者重复的运行成为多个程序, 且该程序所造成的程序还因为不同的使用者,而有不同的权限,且每个 process 几乎都是独立的。