当我的公司文件服务器填满了,我有一个非常大的恐慌。
在追溯源代码后,我发现有一个.recycle文件夹,保持所有的文件删除(这也是隐藏的)
反正有禁用此function?
或定期运行一个命令,将删除所有的垃圾?
编辑
我的smb.conf的例子
[homes] comment = Home path = /home/%S/smbhome browseable = no writable = yes read only = no -->* veto files = /.recycle/ --> vfs objects = recycle --> recycle:keeptree=True --> recycle:versions=True --> recycle:touch=True hide dot files = yes force directory mode = 0770 force create mode = 0660 force group = grp-it valid users = @grp-it, %S invalid users =
我应该只是注释掉这些行。
什么VETO文件? (标记*)
这听起来像你已经configuration了Samba 回收插件。 这通过Samba共享将文件复制到.recycle目录。
该插件是使用smb.conf的vfs objects共享configuration选项启用的。 要禁用它,findvfs objectsconfiguration选项,并从值中删除recycle (如果只引用recycle则完全删除该选项),也可以删除前缀为“ recycle:选项。
我们使用如下所示的日常cron作业来删除10天以前.recycle中的文件并清理空目录:
#!/bin/sh for d in /home/*/.recycle do if [ -d "$d" ] then tmpreaper --mtime-dir --symlinks 10d "$d" find "$d" -depth -mindepth 1 -type d -print0 | xargs --null --no-run-if-empty rmdir --ignore-fail-on-non-empty fi done
该脚本使用tmpreaper软件包。
编辑
veto files选项阻止用户通过文件共享查看或访问.recycle目录。
如果您想禁用回收插件,则删除或注释掉除了veto files行以外的所有行。 要允许用户查看和访问名为.recycle目录,请将veto files行删除或注释掉。