• April 24, 2024, 04:17:12 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: [1] 2

Author Topic: Adding recycle bin  (Read 16018 times)

jrbilodeau

  • Level 3 Member
  • ***
  • Posts: 100
Adding recycle bin
« on: August 29, 2008, 06:27:48 AM »

Here is a feature that i would like to see added as well as how to add it. i would like to have a recycle bin which is possible to do with samba

under the [ global ] setion of the smb.conf file add the following lines

vfs object = recycle
recycle:repository = .recycle
recycle:directory_mode = 0777
recycle:subdir_mode = 0777
recycle:keeptree = Yes
recycle:versions = Yes
recycle:touch = No
recycle:touch_mtime = No
recycle:maxsize = 0
recycle:exclude = *.tmp,*.temp, ~$*, *.~??
recycle:exclude_dir = /.recycle

this will create a .recycle directory in the root of the Volume as soon as something is delected. so if you have 2 Volumes like i do, you would have one recycle bin on Volume_1 and one on Volume_2

this addition would be greatly appreciate by many users i belive
Logged

coolspot

  • Level 1 Member
  • *
  • Posts: 6
Re: Adding recycle bin
« Reply #1 on: September 04, 2008, 10:26:47 PM »

Yes, out of the box support for a recycle bin would be nice. Thanks to your article, I was able to put it in via fun_plug, but for many users, I'm sure that would be beyond their comfort level.
Logged

jrbilodeau

  • Level 3 Member
  • ***
  • Posts: 100
Re: Adding recycle bin
« Reply #2 on: September 05, 2008, 06:44:40 AM »

Ya, after having accidentally deleted a few files, i decided to look into the possibility of having a recycle bin. i have seen many posts about people that lost of deleted files, and i think that this is a great way to avoid that for most people.
Logged

bigclaw

  • Level 2 Member
  • **
  • Posts: 81
Re: Adding recycle bin
« Reply #3 on: September 05, 2008, 06:48:46 AM »

Will these deleted files show up in the Windows recycle bin (on the desktop), or do you have to navigate to the said directory to permanently delete them?

Thanks.
Logged

coolspot

  • Level 1 Member
  • *
  • Posts: 6
Re: Adding recycle bin
« Reply #4 on: September 06, 2008, 12:56:24 AM »

Will these deleted files show up in the Windows recycle bin (on the desktop), or do you have to navigate to the said directory to permanently delete them?

It's a separate folder which you need to manually clear out.

Unfortunately Windows does not support a network recycle bin, so I do not think there will be a way to support it. The option provided by jrbilodeau is as good as it gets  :)
Logged

jrbilodeau

  • Level 3 Member
  • ***
  • Posts: 100
Re: Adding recycle bin
« Reply #5 on: September 09, 2008, 05:50:01 AM »

Ya it creates a folder called .recycle in the root of the drive
Logged

Lucid

  • Level 3 Member
  • ***
  • Posts: 139
Re: Adding recycle bin
« Reply #6 on: September 10, 2008, 10:02:50 AM »

soudns good to me. If only I could understand the instructions...
Logged

jrbilodeau

  • Level 3 Member
  • ***
  • Posts: 100
Re: Adding recycle bin
« Reply #7 on: September 24, 2008, 06:56:49 AM »

the smb.conf file is hidden to a normal user. you need telnet access to be able to see it.
Logged

Lucid

  • Level 3 Member
  • ***
  • Posts: 139
Re: Adding recycle bin
« Reply #8 on: September 24, 2008, 08:30:14 AM »

Of course. I just read the post again. Thanks for the info. I assume that  in order to permanently delete the files one must navigate to the recycle bin DIR and manually delete it right?

TIA
Logged

jrbilodeau

  • Level 3 Member
  • ***
  • Posts: 100
Re: Adding recycle bin
« Reply #9 on: September 25, 2008, 07:01:51 AM »

that is correct. once you delete it from the recycle bin it gone. also just to clarify, when you delete it doesn't ask if you want it go to the recycle bin, it just sends it there.
Logged

Lucid

  • Level 3 Member
  • ***
  • Posts: 139
Re: Adding recycle bin
« Reply #10 on: September 25, 2008, 07:12:50 AM »

Very helpful. Karma coming your way!
Logged

puterboy

  • Guest
Re: Adding recycle bin
« Reply #11 on: October 07, 2008, 05:47:11 PM »

the smb.conf file is hidden to a normal user. you need telnet access to be able to see it.

Just a clarification that may not be obvious to the new user. If you just write to /etc/samba/smb.conf then the changes will be lost with each power-down/reboot.

You need to write the changes to the version stored in flash (which if done improperly could make your machine inoperable. If you are using Fonz's fun_plug you may want to look at /ffp/sbin/store-passwd.sh for an example of how to write (relatively safely) to the flash memory).

I haven't looked at this extensively, but it appears based on a quick look at /etc/rc.sh, that to make the changes permanent you will want to first edit /etc/samba/smb.default and the write those changes to the corresponding files in /dev/mtdblock0 (and maybe also /dev/mtdblock1) -- look at either /etc/rc.sh or /ffp/sbin/store-passwd.sh for examples on how to do this.

I believe that what happens is that the compiled program /usr/bin/smbcom (which is run on boot from rc.sh) concatenates samba.default (which contains the system-level config parameters) with /mnt/HD_a4/.systemfile/.smb.ses [note may not be HD_a4 on your system] (which contains the user/group samba share details). The concatenated result (minus any commented lines) is then written out to /etc/samba/smb.conf. Then rc.sh launched the smbd/nmbd daemons.

The bottom line is that if you want the changes to stick, you will likely need to make changes to the flash version of smb.default. Also, if you change the smb.default file then the changes won't take affect until you reboot or alternatively you could probably kill the smbd/nmbd daemons, re-run smbcom and then restart the daemons. Similarly, if you edit /etc/samba/smb.conf directly the changes won't take effect until you kill smb/nmbd and then restart them (or alternatively you could probably just send a SIGHUP to the smbd process)

AGAIN DISCLAIMER - I CAN'T PROMISE THIS WILL WORK, I AM ONLY GIVING SOME POINTERS. THIS PROBABLY WILL VOID YOUR WARRANTY AND IT COULD BRICK YOUR MACHINE IF I AM WRONG OR IF YOU MAKE A MISTAKE.
Logged

Lucid

  • Level 3 Member
  • ***
  • Posts: 139
Re: Adding recycle bin
« Reply #12 on: October 07, 2008, 06:46:52 PM »

Nice reply. I use this for my work and so I'll pass until Dlink adds this feature.

Thanks for the warning!!
Logged

s5678

  • Level 1 Member
  • *
  • Posts: 2
Re: Adding recycle bin
« Reply #13 on: March 10, 2009, 06:18:25 PM »

Removed.
« Last Edit: March 10, 2009, 10:40:37 PM by D-Link Multimedia »
Logged

D-Link Multimedia

  • Poweruser
  • Level 7 Member
  • **
  • Posts: 1066
    • D-link Systems, Inc.
Re: Adding recycle bin
« Reply #14 on: March 10, 2009, 10:43:01 PM »

Please read the forum rules BEFORE posting.

That being said, it is not as simple to add this feature as you may believe. Unfortunately we have network access per username which means that if you have one single recycle bin and multiple users then ANYONE can see ANYONE elses deleted files if they did not empty the recycle bin in this scenario. If/when we implement it will be done in the correct fashion.
Logged
Pages: [1] 2