※ 引述《joedenkidd (優質的藍色射手)》之銘言:
: 當我在搬檔案發生一個問題:
: mv /home/test.php /var/www/html/ 時
: 用firefox看會有問題會出現forbidden
: 如果用
: cp /home/test.php /var/www/html/ 時
: 用firefox看,就可以顯示出好寫網頁
: 權限都是root
: 我的OS是用fedora9
mv 會保留檔案的屬性,像是timestamp, permission等
cp 只是拷貝內容,新檔的屬性根據使用者,該目錄設定等新建屬性
你的情況應該是遇到了SELinux
在/var/www/html下的檔若沒有給httpd讀取的selinux tags就顯示不出來
可以用ls -Z 來列出selinux tags, 比較mv和cp出來的檔有何不同
--
The 4400 ~ A Place In Time ~ [Amanda Abizaid]
So long ago, another life, I can feel your heartbeat.
It's not a dream, remember us. I can see it in your eyes.
We'll find our place in time, a place in time beyond the sun.
We'll find our place in time, a place in time to call our own.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.102.157