fedora9 檔案移動問題 - Linux

By Audriana
at 2008-10-29T14:19
at 2008-10-29T14:19
Table of Contents
※ 引述《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.
--
: 當我在搬檔案發生一個問題:
: 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.
--
Tags:
Linux
All Comments
Related Posts
fedora9 檔案移動問題

By Franklin
at 2008-10-29T13:43
at 2008-10-29T13:43
解析度的疑問

By Andrew
at 2008-10-29T13:20
at 2008-10-29T13:20
無法調整解析度

By Odelette
at 2008-10-29T13:17
at 2008-10-29T13:17
無法調整解析度

By Harry
at 2008-10-29T13:14
at 2008-10-29T13:14
解析度的疑問

By Catherine
at 2008-10-29T13:02
at 2008-10-29T13:02