Signiant Support

Unable to Rename a File on a Storage Device Using ZFS Print


When a file is transferred to a storage device running ZFS (a combined file system and logical volume manager designed by Sun) and the file previously exists, the job is unable to rename the work file. The renaming process fails with the message:

    "Unable to preserve the original copy of 'filename': Permission denied"

Also new files written to the storage (from a Windows agent) contain the proper Windows permissions but when viewed from a Linux machine they contain no permissions:

        ----------+  1  user   group   38932 Mar 15 15:34 test.txt


The parent target directory requires an inheritable set of ACL entries (similar to POSIX umask) to make things work.  These are not set by default on UNIX systems, as such they need to be set prior to the initial access by the Windows client. When these are not set the client caches the ACLs of the root of the shared file system essentially forever.

To correct this issue do the following: (This assumes a storage pool called "store")
  1. Type:
    server# zfs create -o "casesensitivity=mixed" store/fts
    server# zfs set sharesmb="name=XTC" store/fts
    server# zfs set aclmode=passthrough store/fts
    server# zfs set aclinherit=passthrough store/fts
    server# chmod -R A=owner@:rwxpdDaARWcCos:df:allow,everyone@:xrcarR:df:allow  /store/fts

    Note: the last command operates on a pathname, here a directory named /store/fts.  All of the ZFS commands operate on file systems, which in ZFS are mounted at / unless otherwise set.  So, store/fts is mounted at /store/fts.  Missing or lacking that initial / can be a minor frustration.

    Note: while automatic formatting may present it as otherwise, the final command is a single line, and should be entered as such.

  2. Restart the SMB server:
            server#   svcadm disable smb/server
            server#   svcadm enable smb/server