Logs

process_usershare_file 有什麼作用?

  • April 27, 2016

我有一個 samba 伺服器,它在每個共享的日誌中都給了我這個(在這種情況下,“公共”是共享):

Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.398065,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.398688,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.400642,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.401232,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.403194,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.403814,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.404843,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.bat failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.405536,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.bat failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.406666,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.cmd failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.407276,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.cmd failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.408284,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.exe failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.408987,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.exe failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.410125,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.com failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.410716,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.com failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.411692,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.pif failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.412420,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.pif failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.413585,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.lnk failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.414163,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.lnk failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.415144,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.dll failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.415857,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/public.dll failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.418115,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.418842,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.424562,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.427558,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.433017,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.436073,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. No such file or directory
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.441569,  0] param/loadparm.c:9114(process_usershare_file)
Sep  2 07:49:42 MyServer smbd[31606]:   process_usershare_file: stat of /var/lib/samba/usershares/publi failed. Permission denied
Sep  2 07:49:42 MyServer smbd[31606]: [2014/09/02 07:49:42.444667,  0] param/loadparm.c:9114(process_usershare_file)

應該做什麼,以及為什麼process_usershare_file它失敗的任何想法?

編輯:我什/var/lib/usershare/至根本不使用。我不知道它為什麼在那兒看。

簡潔版本:

客戶端電腦正在使用啟用了“Windows Defender”的 MS Windows 。

掃描過程負責該日誌文件垃圾郵件……

驗證:檢查客戶端上執行“Windows Defender”掃描的日期和時間,與您的 SAMBA 日誌進行比較。

Stat 手冊頁

描述

這些函式返回有關文件的資訊。文件本身不需要權限,但在 stat() 和 lstat() 的情況下 - 需要對指向文件的路徑中的所有目錄具有執行(搜尋)權限。

另請參閱本教程

我相信您需要設置預設權限。


評論答案

使用“net usershare”命令在後台定義共享,定義保存在 /var/lib/samba/usershares/ 中。因此,使用此方法定義的共享在 smb.conf 中不可見。

您是否使用 CLI 設置了任何共享?

引用自:https://unix.stackexchange.com/questions/153355