Enabling ownership preservation for objects on CIFS volumes

To preserve the ownership of objects in Copy and Move actions between CIFS volumes, add an admin knob.

Before you begin

The credentials used for connecting to the target server must be defined in the server's Administrators group.

About this task

Without preserving ownership, the copied or moved object on the target server is owned by the user whose credentials are used for connecting to the target server. With ownership preservation enabled, ownership is defined as follows:
  • Objects are copied or moved between CIFS servers in different domains but the user name of the source object owner is defined in both domains. In this case, the user in the target server domain owns the copied or moved object. For example, the user JohnDoe is defined in the source domain Support and in the target domain Service. Thus, objects on the server in the source domain are owned by user Support/JohnDoe. After being copied or moved to the server in the target domain, the objects are owned by user Service/JohnDoe.
  • Objects are copied or moved between CIFS servers in different domains but the user name of the source object owner is not defined in the target domain. In this case, the copied or moved object on the target server is owned by the user whose credentials are used for connecting to the target server. For example, the source objects are owned by the local user JohnDoe. This user is not defined in the target domain. The credentials of user JaneDoe are used for connecting to the target server. After being copied or moved to the server in the target domain, the objects are owned by user JaneDoe.
  • If the owner information on the target server cannot be resolved, for example, because a slow connection caused a query timeout, the object on the target server is owned by the target's Domain Administrator.

Procedure

  1. Using an SSH tool, log in to the data server VM as root.
  2. To insert the admin knob, open a shell and run the following command:
    psql -U dfuser dfdata -c "INSERT INTO public.adminknobs (name,value,description,valuetype,use) VALUES ('smb_set_user_policy', 'smart', 'user policy copy/move', 'str', 2);"
  3. Restart services by running this command:
    service deepfiler restart

What to do next

At any time, you can disable this capability by removing the admin knob with the following command:
psql -U dfuser dfdata -c "DELETE FROM public.adminknobs where name='smb_set_user_policy';"

This also requires restarting services.