我想在使用samba将 centos 6.5 中的文件复制到 windows 7 文件夹时出错。 这是错误消息:
you need permission to perform this action
You require permission from ERP\hao to make change to this file.
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50
security = user
[erp]
comment = ERP
path = /opt/erp
public = yes
writable = yes
printable = no
browseable = no
create mask = 0777
create mode = 0777
directory mode = 0777
share modes = yes
force user = hao
force group = hao
read only = no
我要复制位置的文件:
的/ opt / ERP / MVE
我的桑巴路径
的/ opt / ERP
[hao@erp mve]$ stat -c '%a %n' *
777 7841e10a957d4bceb2205632c49543af.ygk
777 p18i13847jgnl1s91kujqlh1t9c3.ygk
[hao@erp erp]# ls -l mve/
-rwxrwxrwx. 1 hao hao 63467455 Mar 10 21:38 7841e10a957d4bceb2205632c49543af.ygk
-rwxrwxrwx. 1 hao hao 111912448 Mar 10 21:46 p18i13847jgnl1s91kujqlh1t9c3.ygk
[root@erp erp]# smbd --version
Version 3.6.9-167.el6_5
[hao@erp erp]# ls -l
drwxrwxrwx. 2 hao hao 4096 Mar 11 09:42 mve
我可以复制/ opt / erp中的所有文件,除了在mve文件夹中。 请帮忙,如何解决这个问题。请指教。谢谢。
答案 0 :(得分:0)
使用CentOS 6.5时,这对我在Windows 7上起作用。
http://rbgeek.wordpress.com/2012/05/25/how-to-install-samba-server-on-centos-6/
指示略有变化..
/etc/samba/smb.conf
中设置值)。\\192.168.x.x\
代替\\centos
。/samba
和/samba/share
并相应地设置权限。yum install nano
答案 1 :(得分:0)
我遇到了类似的问题,结果发现它与SELinux安全上下文有关。
我必须运行命令chcon -t samba_share_t /<path>/<to>/<share> -R
。
现在我可以在共享文件夹中创建和更改文件。