虚拟的CentOS 6.2 - 如何使用Samba共享的/ var / WWW [英] virtual centOS 6.2 - How to share /var/www using Samba

查看:123
本文介绍了虚拟的CentOS 6.2 - 如何使用Samba共享的/ var / WWW的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Windows XP,安装VirtualBox的,现在有一个CentOS的虚拟机。
我共享使用Samba的两台计算机之间的文件夹。

I have Windows XP, installed VirtualBox, and have now a centOS virtual machine. I am sharing folders between the two machines using Samba.

我已经成功地在主目录访问共享文件夹。
我现在的问题是,我该如何访问在/ var / WWW? (我在除路径smb.conf中与主目录完全一样的设置)。

I have successfully accessed shared folders in the Home directory. My problem now is how do I access /var/www? (I have exactly the same setting with home directories in smb.conf except path).

先谢谢了。

推荐答案

您必须添加该部分smb.conf的配置:

You must add such section to the smb.conf:

[www]
   comment = Web Root Dir
   path = /var/www
   valid users = user
   public = no
   writable = yes
   printable = no

用户用户必须在制度和桑巴存在(由的smbpasswd -a用户添加)。当然你也可以使用其他用户名。

User user must exist in the system and in Samba (added by smbpasswd -a user). Of course you can use other username.

检查您的用户用户可以在Linux下访问这个文件系统(不包括桑巴)。如果不能,你必须给他的访问权限在Linux中。

Check if your user user can access this filesystem in Linux (without samba). If it can't you must give him access rights in Linux.

这篇关于虚拟的CentOS 6.2 - 如何使用Samba共享的/ var / WWW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆