06. oktober 2003 - 02:40Der er
1 kommentar og 1 løsning
forskel på create mode og directory mode
jeg har fundet ud af at bruge chmod, men i min smb.conf sætter man to sær rettigheder hver gang, både create mode og directory mode (andre gange hedder det mask i stedet for mode). er der en kort forklaring på forskellen?
det er de permissions en fil og en mappe bliver oprettet med .. mode er bare et synonym for mask
create mask (S) A synonym for this parameter is create mode .
When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a file. Any bit not set here will be removed from the modes set on a file when it is created.
The default value of this parameter removes the 'group' and 'other' write and execute bits from the UNIX modes.
Following this Samba will bit-wise 'OR' the UNIX mode created from this parameter with the value of the force create mode parameter which is set to 000 by default.
This parameter does not affect directory modes. See the parame- ter directory mode for details.
See also the force create mode parameter for forcing particular mode bits to be set on created files. See also the directory mode parameter for masking mode bits on created directories. See also the inherit permissions parameter.
Note that this parameter does not apply to permissions set by Windows NT/2000 ACL editors. If the administrator wishes to enforce a mask on access control lists also, they need to set the security mask.
Default: create mask = 0744
Example: create mask = 0775
create mode (S) This is a synonym for create mask.
directory mask (S) This parameter is the octal modes which are used when converting DOS modes to UNIX modes when creating UNIX directories.
When a directory is created, the necessary permissions are cal- culated according to the mapping from DOS modes to UNIX permis- sions, and the resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a directory. Any bit not set here will be removed from the modes set on a directory when it is created.
The default value of this parameter removes the 'group' and 'other' write bits from the UNIX mode, allowing only the user who owns the directory to modify it.
Following this Samba will bit-wise 'OR' the UNIX mode created from this parameter with the value of the force directory mode parameter. This parameter is set to 000 by default (i.e. no extra mode bits are added).
Note that this parameter does not apply to permissions set by Windows NT/2000 ACL editors. If the administrator wishes to enforce a mask on access control lists also, they need to set the directory security mask.
See the force directory mode parameter to cause particular mode bits to always be set on created directories.
See also the create mode parameter for masking mode bits on cre- ated files, and the directory security mask parameter.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.