Samba force create mode does not seem to be enforced when running cp -a

Solution In Progress - Updated -

Issue

I would like all clients to write files using 0777 permissions. To do this, I have edited my smb.conf with the following options:

[glustershare]
        ...
        vfs objects = glusterfs
        ...
        directory mode = 0777
        create mode = 0777
        force directory mode = 0777
        force create mode = 0777
        ...

When I copy a file (cp /file /share/file) to the (vfs-gluster) share, it has 0777 permissions as expected. However, when I copy a file with preserve permissions, (cp -a /file /share/file), the original mode is put on the file.

Environment

  • RHGS 3.2.x
  • RHGS 3.1.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content