samba无法删除文件
使用getfcal 为文件夹添加用户,然后通过samba共享,为何无法删除用户创建的文件,但是可以删除文件夹及文件夹下面的内容。
文件夹用户及组权限:
root@DigiOcean:/home# getfacl zzz
# file: zzz
# owner: root
# group: root
user::rwx
user:hhh:rwx
group::r-x
mask::rwx
other::r-x
文件夹权限:
root@DigiOcean:/home# ls -l |grep zzz
drwxrwxr-x+ 2 root root 4096 Dec 30 18:11 zzz
smb.conf配置:
# from localhost.localdomain (127.0.0.1)
# Date: 2000/11/16 17:29:17
# Global parameters
[global]
log file = /var/log/samba/%U
name resolve order = wins lmhosts bcast
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
socket options = TCP_NODELAY
use sendfile = yes
follow symlinks = No
username map = /etc/samba/smbusers
encrypt passwords = yes
passwd program = /usr/bin/passwd %u
dns proxy = No
netbios name = nasdd
unix password sync = Yes
workgroup = MSHOME
add user script = useradd %u
security = user
display charset = UTF8
unix charset = UTF8
dos charset = UTF8
max log size = 50
##########################
max protocol = SMB2
strict allocate = yes
aio read size = 4096
aio write size = 4096
##########################
#
##########################
use sendfile = yes
read raw = yes
write raw = yes
large readwrite = yes
getwd cache = yes
#######################
strict locking = no
fake oplocks = no
oplocks = no
[homes]
browseable = no
comment = Home Directories
writable = yes
available = yes
[xxx]
path = /home
writable = yes
public = yes
create mode = 0777
force create mode = 0777
create mask = 0755
directory mask = 0755
我使用hhh用户在Windows端访问samba共享,在zzz文件夹中能创建文件,和文件夹,能够删除文件夹,但是不能删除文件,不能修改文件名,提示为:“无法删除:访问被拒绝,请确定磁盘未被写保护或文件未被使用”。
跪求高手,在线等。
------解决方案--------------------
samba对于文件名中特定字符的支持不好,gb2312没有问题,如果是文件名中有日文或特殊字符就无法上传和删除,你把文件名先改成英文试一下。另外linux平台中默认创建的中文为UTF8编码,而windows创建的中文为gb2312,统一格式后就没有问题了。