Is it possible to make the samba like local storage (Ctrl + Z to undo delete)?

testcb00

Dabbler
Joined
Feb 3, 2021
Messages
31
I am exploring the settings of Samba Share.

Currently I want to achieve the delete function. With the Export Recycle Bin, I can find what I have deleted in the .recycle directory.
However, this may cause a little time to find the deleted files and move back to original place.

I would like to know if there are any method to provide Undo (Ctrl + Z) function in Samba Share.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
I am exploring the settings of Samba Share.

Currently I want to achieve the delete function. With the Export Recycle Bin, I can find what I have deleted in the .recycle directory.
However, this may cause a little time to find the deleted files and move back to original place.

I would like to know if there are any method to provide Undo (Ctrl + Z) function in Samba Share.
It's important to understand what things are happening on the server and what things are happening on the client. "Undo" is purely client-side. The SMB / NFS protocol knows nothing about this operation. So whatever solution you want needs to occur there (on client).
 

testcb00

Dabbler
Joined
Feb 3, 2021
Messages
31
It's important to understand what things are happening on the server and what things are happening on the client. "Undo" is purely client-side. The SMB / NFS protocol knows nothing about this operation. So whatever solution you want needs to occur there (on client).
So there is no method to enable the "Undo" in Samba Share?
It seems that the Client side do not know the .recycle directory.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
So there is no method to enable the "Undo" in Samba Share?
It seems that the Client side do not know the .recycle directory.

Any communication with a remote server goes through the following steps:

(1)Client -> (2)sharing protocol -> (3)Server

There is no concept of "undo" in (2) and hence no ability to implement in (3). Any implementation has to happen in (1) and go through the same ops as anything else via the SMB protocol. C.F. MS-SMB2

The only way to really pierce the veil of (2) is to send IOCTL / FSCTL via the SMB protocol, but in this case both the client and server need to implement them. I'm not aware of such a thing existing in Windows.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
If you are aware of such an FSCTL in Windows and have relevant documentation and PCAPs, I could possibly implement in Samba (if you provide the relevant collateral in a jira ticket).
 
Top