+ -
当前位置:首页 → 问答吧 → 求家庭服务器软件配置列表

求家庭服务器软件配置列表

时间:2011-10-11

来源:互联网

VirtualBox装的Fedora 12 虚拟机,想把里面的/var/www/html共享出来在Ubuntu里写代码并保存到虚拟机的 /var/www/html里,配置文件是这样的(我把大段的文字注释删了):
代码:
#--------------
#
#======================= Global Settings =====================================

[global]

# ----------------------- Netwrok Related Options -------------------------
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
   workgroup = MYGROUP
   server string = Samba Server Version %v

;   netbios name = MYSERVER

;   interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
;   hosts allow = 127. 192.168.12. 192.168.13.

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach

   # logs split per machine
   log file = /var/log/samba/log.%m
   # max 50KB per log file, then rotate
   max log size = 50

# ----------------------- Standalone Server Options ------------------------
#


   security = user
;   passdb backend = tdbsam


# ----------------------- Domain Members Options ------------------------
#

# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *


;   realm = MY_REALM

;   password server = <NT-Server-Name>

# ----------------------- Domain Controller Options ------------------------
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#

;   domain master = yes
;   domain logons = yes

   # the login script name depends on the machine name
;   logon script = %m.bat
   # the login script name depends on the unix user used
;   logon script = %u.bat
;   logon path = \\%L\Profiles\%u
   # disables profiles support by specifing an empty path
;   logon path =         

;   add user script = /usr/sbin/useradd "%u" -n -g users
;   add group script = /usr/sbin/groupadd "%g"
;   add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
;   delete user script = /usr/sbin/userdel "%u"
;   delete user from group script = /usr/sbin/userdel "%u" "%g"
;   delete group script = /usr/sbin/groupdel "%g"


# ----------------------- Browser Control Options ----------------------------
#

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   local master = no
;   os level = 33
;   preferred master = yes

#----------------------------- Name Resolution -------------------------------

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.

;   wins support = yes
;   wins server = w.x.y.z
;   wins proxy = yes

;   dns proxy = yes

# --------------------------- Printing Options -----------------------------
#

# You can choose a non default printing system using the Printing option

;   load printers = yes
   cups options = raw

;   printcap name = /etc/printcap
   #obtain list of printers automatically on SystemV
;   printcap name = lpstat
;   printing = cups

# --------------------------- Filesystem Options ---------------------------
#

# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares

;   map archive = no
;   map hidden = no
;   map read only = no
;   map system = no
;   store dos attributes = yes


#============================ Share Definitions ==============================

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
;   valid users = %S
;   valid users = MYDOMAIN\%S

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
;   guest ok = no
;   writable = No
   printable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
;   [netlogon]
;   comment = Network Logon Service
;   path = /var/lib/samba/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;   [Profiles]
;   path = /var/lib/samba/profiles
;   browseable = no
;   guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the "staff" group
;   [public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = yes
;   printable = no
;   write list = +staff

[html]
   comment = html doc
   path = /var/www/html
   public = yes
   writable = yes
   write list = smbuser
#最下边的[html]是我自己加的。

如果我写
代码:
path = /homt/test
的话就能挂载但是不能查看内容,在客户端系统上使用命令
代码:
sudo mount //172.33.7.184/html mnt/share -o username=smbuser%123456
就能挂载,不提示任何错误,但是不能查看里面的内容,使用
代码:
ls /mnt/share
不显示任何内容。
如果配置文件里设置共享路径为/var/www/html就不能挂载:
代码:
$ sudo mount //172.33.7.184/html /mnt/share -o username=smbuser%123456
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

不知道是怎么回事。/var/www/html/和/home/test/两个目录和里面的文件权限都是777.
Ubuntu 11.04,Fedora 12,samba版本(应该是3.4.9吧,不知道哪一个是,全贴出来):
代码:
libsmbclient-3.4.2-47.fc12.i686
pam_smb-1.1.7-11.fc12.i686
gvfs-smb-1.4.1-3.fc12.i686
samba-client-3.4.9-60.fc12.i686
samba-3.4.9-60.fc12.i686
samba-common-3.4.9-60.fc12.i686
samba-winbind-clients-3.4.2-47.fc12.i686

怎样才能把/var/www/html共享出来并且有写权限?

*会不会是smbuser的权限问题,我的smbuser就是简单的用useradd建立的。

作者: bristlegbfly   发布时间: 2011-10-11