在 Windows 上使用 Samba 共享 NFS 访问 - TortoiseSVN 无法设置文件 - 只读:不支持该请求
美好的一天,所以每当我尝试在 Windows 计算机上使用 TortoiseSVN (v1.10) 在位于 samba 服务器(使用 AD 身份验证)下的工作副本上执行“SVN 更新”时,我都会收到以下错误Linux机器。在发布到此处之前,我尝试首先在互联网上搜索此特定错误,但我确实找不到任何与此完全相同的错误。
这是我迄今为止为解决该问题所做的尝试。
chmod -R 777 samba共享的所有文件夹和文件,确保不是Linux端的权限问题。
chown -R
. ;所有文件夹和文件,以确保不是所有权问题。 执行“SVN 清理”勾选所有框。它执行成功,但在执行更新时仍然出现相同的错误。
通过执行“SVN checkout”创建新的工作副本。签出成功,但是一旦您在存储库上创建新文件,执行“SVN 更新”将再次导致相同的错误。
修改 Windows 资源管理器上的权限,右键单击并选中“所有者”、“组”和“所有人”的“完全控制”,将其应用到主文件夹、子文件夹和文件。
使用以下参数配置 smb.conf 以确保所有权限均已打开:
<前><代码>[wspace] 评论=分享 路径 = /我的/共享位置 有效用户 = @"My_Authenticated_Group_in_AD" 可浏览 = 是 只读 = 否 客人可以 = 否 创建掩码 = 0666 目录掩码=0777 删除只读 = 是 创建掩码 = 0777 目录掩码=0777 强制创建模式 = 0777 强制目录模式 = 0777 dos 文件模式 = 是
什么有效? 如果我在 Windows 计算机的本地文件夹上执行“SVN checkout”和“SVN update”,我的所有操作都会正常工作,比如在 C:\Users
执行“SVN 更新”应该会成功操作并更新 SVN 存储库的本地工作副本。但它导致错误“无法设置文件”和“只读:不支持该请求”错误。
good day, so I'm receiving the error below whenever I'm trying to do an "SVN update" on a windows machine using TortoiseSVN (v1.10) on a working copy located on a samba server (using AD authentication) under a Linux machine. I tried searching first for this specific error on the internet before posting here, but I really can't find any exact same error the same as this.
Here's what I've tried so far to fix the issue.
chmod -R 777 all folders and files of the samba share to make sure it's not a permission issue on Linux side.
chown -R <AD_user>.<AD_user> all folders and files to make sure it's not an ownership issue.
Do an "SVN cleanup" ticked all boxes. It executes successfully but still the same error when doing an update.
Create a fresh working copy by doing "SVN checkout". The checkout is successful, but once you create a new file on the repository, doing an "SVN update" will result to the same error again.
Modifying the permissions on the Windows Explorer, right clicking and checking "Full Control" for the "Owner", "Groups" and "Everyone" applying it to the main folder, sub-folders and files.
Configure smb.conf with the parameters below just to make sure all permissions are open:
[wspace] comment = SHARE path = /My/Share_Location valid users = @"My_Authenticated_Group_in_AD" browseable = Yes read only = No guest ok = No create mask = 0666 directory mask = 0777 delete readonly = Yes create mask = 0777 directory mask = 0777 force create mode = 0777 force directory mode = 0777 dos filemode = yes
What works? All my operation works properly if I do "SVN checkout" and "SVN update" on my windows machine's local folder, say under C:\Users<user>\TEST_SVN. No errors like this is produced.
Doing an "SVN update" should result to a successful operation and update my local working copy of the SVN repository. But it resulted to an error "Can't set file" and "read-only: The request is not supported" error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,所以我已经自己解决了这个问题。只是在这里发布解决方案,以防有人遇到同样的错误。
修复只是添加这两个参数:
vim /etc/samba/smb.conf
说明:
似乎在 samba 4.8 及更低版本上,这些选项默认设置为“no”。在上面的 samba 4.9(我正在使用的)上,这些默认设置为“yes”。这会强制 samba 启用“扩展属性 (xattr)”,这将使您能够向文件添加属性,例如“key=value”元数据。但这些需要一个“文件系统”来支持扩展属性模块/功能,EXT3、EXT4、ReiserFS、XFS 支持这一点,但对于 NFS(我正在尝试使用 Samba 共享到 Windows 机器)它不支持支持扩展属性。因此,在对修改的文件进行“SVN 更新”时,SVN 可能会尝试为“.svn/pristine/*”文件内的文件设置扩展属性,而这就是失败的原因,SVN 抱怨“不支持操作” (因为NFS不支持)在log.smbd上。因此,解决方法是禁用 samba 配置端对“扩展属性”配置的支持。
在 log.smbd(日志级别 = 9)上,您将看到此错误:
启用参数后,现在应该继续进行 SVN 更新操作。
Okay, so I've already fixed this problem by myself. Just posting the solution here incase anyone out there encounters the same error.
Fix was just adding this two parameters:
vim /etc/samba/smb.conf
EXPLANATION:
It seems that, on samba 4.8 and below, those options are set to "no" by default. And on samba 4.9 (which I'm using) above, these are set to "yes" by default. This forces samba to enable "Extended Attributes (xattr)", which will enable you to add attributes to a file, something like a "key=value" metadata. But these require a "File System" to also support an extended attribute module/feature, EXT3, EXT4, ReiserFS, XFS supports this, but for NFS (which I'm am trying to share to Windows machine using Samba) it doesn't support Extended Attributes. So probably SVN is trying to set an extended attributes to the files inside ".svn/pristine/*" files when doing an “SVN update” for modified files, and that's the one failing and SVN is complaining that the “Operation not supported” (because NFS does not support it) on log.smbd. So the workaround is to disable support on the samba configuration side for "extended attributes" configuration.
On log.smbd (log level = 9), you will see this error:
After enabling the parameters, it should now proceed with SVN update operation.