[RESOLVED] Recycle bin for SMB/CIFS

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [RESOLVED] Recycle bin for SMB/CIFS

      Hello everyone,

      I am new to OMV and linux at all, but after suggestion from friends I installed OMV as my SOHO file server with 7 clients running windows 8.1 and now i am happy that i did it since i have over 30 days up time without any problems. With help of this forum and pages about OMV managed to get everything running (mirror raid, shares, file system) without any problems but now i have question about recycle bin for SMB/CIFS share.

      After deleting some of not important files by accident I realized that i need recycle bin for 2 shared folders and went to shared folders options and enabled box where is recycle bin and left file size and days on 0 value. Problems is now i can't see recycle bin in my shared folders, tried with deleting some test files to see if it will appear but still nothing.

      So my question is how i can see recycle bin folder and what is in it? Have in mind that i am really beginner when this type of software and my guess is that i missing something really basic but can't see it and it's drives me crazy.

      Running OMV 0.5.21 with usb backup and antivirus plugins.
    • Re: Recycle bin for SMB/CIFS

      I think if you are using it you need to have a minimum size and a number of days. If you have 0 for size and days for items to remain there it is probably not storing anything. It depends on what average size of files you are using in the shared folders. If they are small documents (5kb-10kb) you may only need like a 100 MB size and maybe 7 days.

      I just looked at the configuration and if you put 0 for size it is unrestricted and should save any file deleted.

      0 for days is manual deletion.

      You should be able to access the files via command line. I've never used recycle bin.

      I am testing right now. Will write back in a bit.

      In the share that you activated the recycle bin it creates a .recycle folder. Whatever user deletes a file it will create a subfolder with that user's username and then the deleted file will be in that folder. So path would be like this:

      /media/uuid/sharedfoldername/.recycle/username/files

      You may have to learn your way around linux a bit better to get the files. Most useful will be how to use the cp and rm commands.

      BTW, I had to reboot before the recycle bin was active.
    • Re: Recycle bin for SMB/CIFS

      Thank you a lot tekkbebe, problem was in reboot, after rebooted server machine tested it again and files started to show up in /sharedfoldername/.recycle/username/files as you said. OMV web GUI only asked to press apply after changed setting not to restart so that is why i didn't do it at first time.

      I left 0 values because i wanted to manually delete files and to have unrestricted file sizes.

      Also i noticed on some of my clients pc folder .recycle appear as hidden so i needed to set in folder options to see hidden files.

      Thanks again on quick response.
    • Re: [RESOLVED] Recycle bin for SMB/CIFS

      I have got errors on my daily cron job:

      /etc/cron.daily/openmediavault-samba-recycle:
      [: 7: missing ]
      /var/lib/openmediavault/cron.d/samba-recycle-dd889936-b811-4569-b6e8-dfb1f1e870eb: 7: VIDEOS//.recycle: not found
      /var/lib/openmediavault/cron.d/samba-recycle-dd889936-b811-4569-b6e8-dfb1f1e870eb: 8: VIDEOS//.recycle: not found
      find: `/media/cc264c09-f354-435b-8e45-7bc2ac9f159f/FOTOS': No such file or directory
      /var/lib/openmediavault/cron.d/samba-recycle-dd889936-b811-4569-b6e8-dfb1f1e870eb: 10: VIDEOS//.recycle: not found
      find: `/media/cc264c09-f354-435b-8e45-7bc2ac9f159f/FOTOS': No such file or directory

      I deleted those SMB shares/folders (VIDEOS and FOTOS') recently. But i cannot find where to remove these dead links..

      Sorry if this is not the right tread.. ;)
    • Re: [RESOLVED] Recycle bin for SMB/CIFS

      Change the contents of this file /etc/cron.daily/openmediavault-samba-recycle to what is in the codebox. I'm not sure if it will hold but try and let me know. If you have other shares that are using a cron job show me contents of this file before you change it.

      Shell-Script

      1. #!/bin/sh
      2. # This configuration file is auto-generated.
      3. # WARNING: Do not edit this file, your changes will be lost.
      4. find /var/lib/openmediavault/cron.d -maxdepth 1 -type f -iname 'samba-recycle-*' -exec {} \;
    • Re: [RESOLVED] Recycle bin for SMB/CIFS

      Thanks for your quick reply!

      This is what was already in openmediavault-samba-recycle:

      #!/bin/sh
      # This configuration file is auto-generated.
      # WARNING: Do not edit this file, your changes will be lost.
      find /var/lib/openmediavault/cron.d -maxdepth 1 -type f -iname 'samba-recycle-*' -exec {} \;

      I have a couple more smb shares that use recycle.. Is that what you mean? :)
    • Re: [RESOLVED] Recycle bin for SMB/CIFS

      root@SERVER:~# cat /etc/samba/smb.conf

      Source Code

      1. #======================= Global Settings =======================
      2. [global]
      3. workgroup = WORKGROUP
      4. server string = %h server
      5. include = /etc/samba/dhcp.conf
      6. dns proxy = no
      7. log level = 10
      8. syslog = 10
      9. log file = /var/log/samba/log.%m
      10. max log size = 1000
      11. syslog only = yes
      12. panic action = /usr/share/samba/panic-action %d
      13. encrypt passwords = true
      14. passdb backend = tdbsam
      15. obey pam restrictions = yes
      16. unix password sync = no
      17. passwd program = /usr/bin/passwd %u
      18. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
      19. pam password change = yes
      20. socket options = TCP_NODELAY IPTOS_LOWDELAY
      21. guest account = nobody
      22. load printers = no
      23. disable spoolss = yes
      24. printing = bsd
      25. printcap name = /dev/null
      26. unix extensions = yes
      27. wide links = no
      28. create mask = 0777
      29. directory mask = 0777
      30. use sendfile = yes
      31. aio read size = 16384
      32. aio write size = 16384
      33. null passwords = no
      34. local master = yes
      35. time server = no
      36. wins support = no
      37. #======================= Share Definitions =======================
      38. [FOTOS&VIDEOS]
      39. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f/FOTOS&VIDEOS/
      40. guest ok = no
      41. read only = no
      42. browseable = yes
      43. inherit acls = yes
      44. inherit permissions = yes
      45. ea support = no
      46. store dos attributes = no
      47. vfs objects = recycle
      48. recycle:repository = .recycle/%U
      49. recycle:keeptree = yes
      50. recycle:versions = yes
      51. recycle:touch = yes
      52. recycle:directory_mode = 0777
      53. recycle:subdir_mode = 0700
      54. recycle:exclude =
      55. recycle:exclude_dir =
      56. recycle:maxsize = 0
      57. printable = no
      58. create mask = 0755
      59. force create mode = 0644
      60. directory mask = 0755
      61. force directory mode = 0755
      62. hide dot files = yes
      63. valid users = "Claudia","Wouter"
      64. invalid users =
      65. read list =
      66. write list = "Claudia","Wouter"
      67. [FILMS]
      68. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f/FILMS/
      69. guest ok = no
      70. read only = no
      71. browseable = yes
      72. inherit acls = yes
      73. inherit permissions = yes
      74. ea support = no
      75. store dos attributes = no
      76. vfs objects = recycle
      77. recycle:repository = .recycle/%U
      78. recycle:keeptree = yes
      79. recycle:versions = yes
      80. recycle:touch = yes
      81. recycle:directory_mode = 0777
      82. recycle:subdir_mode = 0700
      83. recycle:exclude =
      84. recycle:exclude_dir =
      85. recycle:maxsize = 0
      86. printable = no
      87. create mask = 0755
      88. force create mode = 0644
      89. directory mask = 0755
      90. force directory mode = 0755
      91. hide dot files = yes
      92. valid users = "Claudia","Wouter"
      93. invalid users =
      94. read list =
      95. write list = "Claudia","Wouter"
      96. [MUZIEK]
      97. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f/MUZIEK/
      98. guest ok = no
      99. read only = no
      100. browseable = yes
      101. inherit acls = yes
      102. inherit permissions = yes
      103. ea support = no
      104. store dos attributes = no
      105. vfs objects = recycle
      106. recycle:repository = .recycle/%U
      107. recycle:keeptree = yes
      108. recycle:versions = yes
      109. recycle:touch = yes
      110. recycle:directory_mode = 0777
      111. recycle:subdir_mode = 0700
      112. recycle:exclude =
      113. recycle:exclude_dir =
      114. recycle:maxsize = 0
      115. printable = no
      116. create mask = 0755
      117. force create mode = 0644
      118. directory mask = 0755
      119. force directory mode = 0755
      120. hide dot files = yes
      121. valid users = "Claudia","Wouter"
      122. invalid users =
      123. read list =
      124. write list = "Claudia","Wouter"
      125. [DOWNLOADS]
      126. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f/DOWNLOADS/
      127. guest ok = no
      128. read only = no
      129. browseable = yes
      130. inherit acls = yes
      131. inherit permissions = yes
      132. ea support = no
      133. store dos attributes = no
      134. vfs objects = recycle
      135. recycle:repository = .recycle/%U
      136. recycle:keeptree = yes
      137. recycle:versions = yes
      138. recycle:touch = yes
      139. recycle:directory_mode = 0777
      140. recycle:subdir_mode = 0700
      141. recycle:exclude =
      142. recycle:exclude_dir =
      143. recycle:maxsize = 0
      144. printable = no
      145. create mask = 0755
      146. force create mode = 0644
      147. directory mask = 0755
      148. force directory mode = 0755
      149. hide dot files = yes
      150. valid users = "Wouter"
      151. invalid users = "Claudia"
      152. read list =
      153. write list = "Wouter"
      154. [GEZAMELIJK]
      155. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f/PRIVE/GEZAMELIJK/
      156. guest ok = no
      157. read only = no
      158. browseable = yes
      159. inherit acls = yes
      160. inherit permissions = no
      161. ea support = no
      162. store dos attributes = no
      163. vfs objects = recycle
      164. recycle:repository = .recycle/%U
      165. recycle:keeptree = yes
      166. recycle:versions = yes
      167. recycle:touch = yes
      168. recycle:directory_mode = 0777
      169. recycle:subdir_mode = 0700
      170. recycle:exclude =
      171. recycle:exclude_dir =
      172. recycle:maxsize = 0
      173. printable = no
      174. create mask = 0755
      175. force create mode = 0644
      176. directory mask = 0755
      177. force directory mode = 0755
      178. hide dot files = yes
      179. valid users = "Claudia","Wouter"
      180. invalid users =
      181. read list =
      182. write list = "Claudia","Wouter"
      183. [WOUTER]
      184. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f/PRIVE/WOUTER/
      185. guest ok = no
      186. read only = no
      187. browseable = yes
      188. inherit acls = yes
      189. inherit permissions = no
      190. ea support = no
      191. store dos attributes = no
      192. vfs objects = recycle
      193. recycle:repository = .recycle/%U
      194. recycle:keeptree = yes
      195. recycle:versions = yes
      196. recycle:touch = yes
      197. recycle:directory_mode = 0777
      198. recycle:subdir_mode = 0700
      199. recycle:exclude =
      200. recycle:exclude_dir =
      201. recycle:maxsize = 0
      202. printable = no
      203. create mask = 0755
      204. force create mode = 0644
      205. directory mask = 0755
      206. force directory mode = 0755
      207. hide dot files = yes
      208. valid users = "Wouter"
      209. invalid users = "Claudia"
      210. read list =
      211. write list = "Wouter"
      212. [CLAUDIA]
      213. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f/PRIVE/CLAUDIA/
      214. guest ok = no
      215. read only = no
      216. browseable = yes
      217. inherit acls = yes
      218. inherit permissions = yes
      219. ea support = no
      220. store dos attributes = no
      221. vfs objects = recycle
      222. recycle:repository = .recycle/%U
      223. recycle:keeptree = yes
      224. recycle:versions = yes
      225. recycle:touch = yes
      226. recycle:directory_mode = 0777
      227. recycle:subdir_mode = 0700
      228. recycle:exclude =
      229. recycle:exclude_dir =
      230. recycle:maxsize = 0
      231. printable = no
      232. create mask = 0755
      233. force create mode = 0644
      234. directory mask = 0755
      235. force directory mode = 0755
      236. hide dot files = yes
      237. valid users = "Claudia","Wouter"
      238. invalid users =
      239. read list =
      240. write list = "Claudia","Wouter"
      241. [RAIDRoot]
      242. path = /media/cc264c09-f354-435b-8e45-7bc2ac9f159f//
      243. guest ok = no
      244. read only = no
      245. browseable = yes
      246. inherit acls = yes
      247. inherit permissions = yes
      248. ea support = no
      249. store dos attributes = no
      250. vfs objects = recycle
      251. recycle:repository = .recycle/%U
      252. recycle:keeptree = yes
      253. recycle:versions = yes
      254. recycle:touch = yes
      255. recycle:directory_mode = 0777
      256. recycle:subdir_mode = 0700
      257. recycle:exclude =
      258. recycle:exclude_dir =
      259. recycle:maxsize = 0
      260. printable = no
      261. create mask = 0755
      262. force create mode = 0644
      263. directory mask = 0755
      264. force directory mode = 0755
      265. hide dot files = yes
      266. valid users = "Wouter"
      267. invalid users = "Claudia"
      268. read list =
      269. write list = "Wouter"
      Display All

      The post was edited 1 time, last by djgodlike ().

    • Users Online 1

      1 Guest