Hi all,

Fileserver without recycle bin is like vehicle without brakes....

So this is the solution for the TurnKey Fileserver

In the example below we will activate the recycle bin for a share with name "test" (directory) and the group with access to that share is "testgroup".

1. In order to have the recycle bin option we must install all the dependencies:

apt-get install samba-vfs-modules

2. Configure the samba, enable the recycle bin and use it for the share "test". Open configuration file and in the test section configure like the example below.

[test]
    valid users =  @testgroup
    browseable = yes
    create mask = 0644
    path = /home/test
    directory mask = 0755
    writeable = yes    
    #Recycle bin
    recycle:repository = .trash/%U
    recycle:maxsize = 0
    recycle:versions = Yes
    recycle:keeptree = Yes
    recycle:touch = No
    recycle:directory_mode = 0775
    audit:prefix = %u
    audit:success = open opendir
    audit:failure = all
    audit:facility = LOCAL5
    audit:priority = NOTICE
    vfs object = recycle:recycle full_audit:audit

3. Restart the samba.

4. Test it....

Regards

Forum: 
Jeremy Davis's picture

That sounds like it could be a cool addition to the appliance.

We could do that for the default users. Although TBH I am not super familiar with Samba. Do you know if/how we could make this default for all new Samba users too? That would make it even cooler IMO...

Also I've lodged this as a feature request.

HI,

The recycle bin is per share not per user.

In my example if you have three shares then you will have three different recycle bins, one in each share.

I am sure that there is a way to enable it globaly. This way there is no need to have a bin in each share section.

So, by default the server cant have it, but you think about two things:

1. Required module samba-vfs-modules. Installed by default (while setup).

2. With a script there might be a way to configure that. I am sure there are other ways also... I can't remember how I do that.

Regards

Christos

Add new comment