Linux Samba 共享权限问题 - 仅具有文件系统权限的公共共享
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8005610/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Samba Share Permissions Issue - Public share with file-stystem permissions only
提问by LokMac
I'm trying to create a Samba share on a Linux (SLES10) system, but I'm having trouble with the Samba permissions. I want to create this as a public share, with file permissions controlled at the file-system level (so all users can map the drive, but they can only browse further if they have further file-system permissons).
我正在尝试在 Linux (SLES10) 系统上创建 Samba 共享,但我在使用 Samba 权限时遇到了问题。我想将其创建为公共共享,在文件系统级别控制文件权限(因此所有用户都可以映射驱动器,但如果他们有更多文件系统权限,他们只能进一步浏览)。
I've been able to create the share, and map to it with any user. The problem is that I only seem able to obtain sufficient permissions if I login as "root". If I login with another user, even if they have permissions to read and write to the underlying folder, I cannot browse that any folders at all.
我已经能够创建共享,并与任何用户映射到它。问题是,如果我以“root”身份登录,我似乎只能获得足够的权限。如果我使用其他用户登录,即使他们有权读取和写入底层文件夹,我也根本无法浏览任何文件夹。
Here is the share information from /etc/samba/smb.conf:
这是来自 /etc/samba/smb.conf 的共享信息:
[sambatest]
comment = Samba Test
public = yes
path = /var/opt/folder
read only = No
writeable = Yes
write list = user1 user2 user3
browseable = Yes
Here is an example of the directory permissions in the shared folder:
以下是共享文件夹中目录权限的示例:
drwxrwxr-x 5 user1 group1 40 Nov 4 17:02 .
drwxr-xr-x 11 user1 group1 4096 Oct 20 09:20 ..
drwxrwx--- 4 user1 group1 41 Nov 4 17:02 BASE
drwxrwx--- 6 user1 group1 78 Oct 28 10:11 Files
drwxrwx--- 2 user1 group1 22 Nov 4 17:02 test
After the mapping the drive with the credentials of "user1", I try to browse "test" from Windows XP, but get a message "Z:\test is not accessible: Access is denied".
使用“user1”凭据映射驱动器后,我尝试从 Windows XP 浏览“test”,但收到消息“Z:\test 不可访问:访问被拒绝”。
If I map the same shared folder using the "root" credentials, it works.
如果我使用“root”凭据映射同一个共享文件夹,它就可以工作。
Little help? I'm sure I've come across this before, but can't figure out how to fix it...
帮助不大?我确定我以前遇到过这个问题,但不知道如何解决它...
回答by balsagoth
I think you need to try chmod that dir with 755 and try with this config
我认为您需要使用 755 尝试 chmod 该目录并尝试使用此配置
[sambatest]
comment = Samba Test
public = yes
path = /var/opt/folder
read only = yes
writeable = yes
write list = user1 user2 user3
browseable = yes
create mask = 0775
More info on:
更多信息: