这似乎是一个奇怪的问题,希望有人可以摆脱一些光。 我在一些Ubuntu服务器上设置了一些samba文件夹,供用户做一些文件pipe理。 将文件移入共享后,用户尝试通过samba从Windows XP计算机重命名该文件,但出现错误“您指定的文件名无效或太长,请指定不同的文件名”。
我检查了许可,并从Windows 7中搞砸了,并且遇到了同样的问题。 最终,我发现只要新名称不包含数字“2”,就可以更改文件名。 该文件的新名称应该是“285870_full”,我们可以将其命名为“185870_full”和“385870_full”以及任何我能想到的尝试,但是“285870_full”会给出有关“您指定的文件名无效或太长“
我通过SSH连接到服务器,并能够以没有任何错误的方式重命名文件。 现在通过桑巴我可以看到该文件被命名为“285870_full”,如果我尝试添加另一个“2”,它会给出相同的错误,否则我可以正常重命名。
我尝试了另一个随机的小文本文件,并有相同的问题 – 它不会让我重新命名为任何与'2'的新名称,但'134567890'工作正常。 有任何想法吗?
更新:我将日志级别设置为3,这里是testing日志的相关部分;
reply_mv : pending/31345678901affiliate_pixel33.txt -> pending/31345678901affiliate_p22.txt
[2013/07/22 21:58:39, 3] smbd/reply.c:5981(rename_internals) rename_internals: case_sensitive = 0, case_preserve = 1, short case preserve = 1, directory = pending/31345678901affiliate_pixel33.txt, newname = pending/31345678901affiliate_p22.txt, last_component_dest = 31345678901affiliate_p22.txt
[2013/07/22 21:58:39, 3] smbd/dosmode.c:149(unix_mode) unix_mode(pending/31345678901affiliate_pixel33.txt) returning 0744
[2013/07/22 21:58:39, 2] smbd/open.c:580(open_file) root opened file pending/31345678901affiliate_pixel33.txt read=No write=No (numopen=1)
[2013/07/22 21:58:39, 2] smbd/close.c:612(close_normal_file) root closed file pending/31345678901affiliate_pixel33.txt (numopen=0) NT_STATUS_OK
[2013/07/22 21:58:39, 3] smbd/reply.c:6041(rename_internals) rename_internals: Error NT_STATUS_OBJECT_NAME_INVALID rename pending/31345678901affiliate_pixel33.txt -> pending/31345678901affiliate_p22.txt
[2013/07/22 21:58:39, 3] smbd/error.c:60(error_packet_set) error packet at smbd/reply.c(6273) cmd=7 (SMBmv) NT_STATUS_OBJECT_NAME_INVALID
[2013/07/22 21:58:39, 3] smbd/process.c:1459(process_smb) Transaction 14 of length 162 (0 toread)
[2013/07/22 21:58:39, 3] smbd/process.c:1273(switch_message) switch message SMBtrans2 (pid 11644) conn 0x7fad01371210
我看到用'2'重命名给NT_STATUS_OBJECT_NAME_INVALID?
这是另一个日志片段,它成功地重命名为没有“2”
[2013/07/22 22:05:33, 3] smbd/reply.c:6263(reply_mv) reply_mv : pending/31345678901affiliate_pixel33.txt -> pending/31345678901affiliate_44.txt
[2013/07/22 22:05:33, 3] smbd/reply.c:5981(rename_internals) rename_internals: case_sensitive = 0, case_preserve = 1, short case preserve = 1, directory = pending/31345678901affiliate_pixel33.txt, newname = pending/31345678901affiliate_44.txt, last_component_dest = 31345678901affiliate_44.txt
[2013/07/22 22:05:33, 3] smbd/dosmode.c:149(unix_mode) unix_mode(pending/31345678901affiliate_pixel33.txt) returning 0744
[2013/07/22 22:05:33, 2] smbd/open.c:580(open_file) root opened file pending/31345678901affiliate_pixel33.txt read=No write=No (numopen=1)
[2013/07/22 22:05:33, 3] smbd/reply.c:5816(rename_internals_fsp) rename_internals_fsp: succeeded doing rename on pending/31345678901affiliate_pixel33.txt -> pending/31345678901affiliate_44.txt
[2013/07/22 22:05:33, 2] smbd/close.c:612(close_normal_file) root closed file pending/31345678901affiliate_44.txt (numopen=0) NT_STATUS_OK
[2013/07/22 22:05:33, 3] smbd/reply.c:6041(rename_internals) rename_internals: Error NT_STATUS_OK rename pending/31345678901affiliate_pixel33.txt -> pending/31345678901affiliate_44.txt
[2013/07/22 22:05:33, 3] smbd/process.c:1459(process_smb) Transaction 72 of length 158 (0 toread)
所以我想知道为什么“2”给NT_STATUS_OBJECT_NAME_INVALID?
那么,SSH的工作!,更多的testing案例呢?
存在同样的问题?