網頁

2013年3月22日

[linux] 網路磁碟加上垃圾桶(samba設定)

網路資料匣的檔案執行刪除後,系統就會直接刪除,若誤刪檔案想要救回,可是很困難,預防萬一還是加個垃圾桶比較保險。


編輯smb.conf檔案,然後在分享的資料匣下方加入下列幾行(紅色字),即可完垃圾桶的設置。
[tmp]
browseable = yes
writeable = yes
path = /tmp
force group = user
force user = user
comment = 系統tmp資料匣
vfs object = recycle
recycle:repository = /RECYCLER/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:maxsixe = 0
recycle:exclude = *.tmp



註:「%U」表示依登錄的使用者帳號進到垃圾桶,若是不區分帳號,可以直接指定共同目錄。