SORICH SAMURAIby SORICH

hello,world

2010年6月
             
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

最新の記事

カテゴリー

月間アーカイブ

最新のトラックバック

最新のトラックバック

vmware    2009.07.07 [ Tue ] 1:05

ゲストOS(Ubuntu)をWebサーバーにして、VMwareの共有機能でマウントしたフォルダにあるPHPのアプリケーションを動かそうとしたらエラーが発生しました。
Warning: touch() [function.touch]: Utime failed: Permission denied in /mnt/hgfs/.../workspace/project/cake/libs/file.php on line 130
Warning (2): touch() [function.touch]: Utime failed: Permission denied [CORE/cake/libs/file.php, line 130]
パーミションを777にしても変わらなかったので、どうやら共有されたフォルダのユーザーが501ってのがよくないようです。
root@ubuntu:/mnt/hgfs# ls -la
total 7
dr-xr-xr-x 1 root root    4192 2009-07-07 00:26 .
drwxr-xr-x 3 root root    4096 2009-04-28 00:15 ..
drwxr-xr-x 1  501 dialout  136 2009-03-12 02:47 Shared
ゲストOS(Ubuntu)の/etc/fstabを編集して、Apacheのuidを指定してあげるとよいみたいです。
# Beginning of the block added by the VMware software
.host:/                 /mnt/hgfs               vmhgfs  defaults,ttl=5,uid=www-data     0 0
# End of the block added by the VMware software
※gidも指定できました。 

 共有フォルダを再マウントしてみると、ユーザーが変わりました。
root@ubuntu:/mnt/hgfs# ls -la
total 7
dr-xr-xr-x 1 www-data root    4192 2009-07-06 02:37 .
drwxr-xr-x 3 root     root    4096 2009-04-28 00:15 ..
drwxr-xr-x 1 www-data dialout  136 2009-03-12 02:47 Shared
PHPのエラーも消えました!

トラックバック(0) コメント(0)

カテゴリ:

コメントする




トラックバック(0)

このブログ記事を参照しているブログ一覧: [vmware][mac]共有フォルダのユーザーを変更する


このブログ記事に対するトラックバックURL:

Copyright(C) SORICH Ltd. All Rights Reserved.