[Samba] Change atrributes of file on windows side (or DOS)

Arcadio Sincero asince1 at gl.umbc.edu
Tue Jul 2 09:14:02 GMT 2002

On Tue, 2 Jul 2002, Kevin Hickman wrote:
> To whomever may help:
>      I am trying to change the attributes for a file on the linux system, but trying to do it on the windows side or dos prompt.  The dos attrib command will not do this, and while researching I found a setmode command, but this gives me an "invalid command" message.  Can someone tell me how to modify a file's attributes on a linux system from the windows end as a mapped network drive?
> Thank You,

Did you specify the "map hidden" and "map system" parameters in your
smb.conf file?  If not, you need to do so.  See man smb.conf for more
details.  In addition, you may need to specify a proper "create mask"
value in the smb.conf as well.  The reason for this is the way Samba fakes
the DOS hidden, system, and archive DOS attributes on a traditional
unix-style filesystem.  It does it by mapping the hidden attribute to the
world-executable permission on unix, the system attribute to the
group-executable permission, and the archive attribute to the
user-executable permission.  However, because the default "create mask"
value is "0744", the world and group executable permissions are always
automatically removed.  In other words, even if you set "map hidden" and
"map system" to "yes", it still won't work unless you also change the
default "create mask" value so that the world and group executable
permissions are not automatically removed.  Something like "0755" would

Note that the archive attribute should already work if you are using the
Samba defaults.  "map archive" is set to "yes" by default, and because the
default "create mask" is 0744, the user executable permission is allowed
to be set on the file.

I hope this helps.

- Arcadio

More information about the samba mailing list