Avatar billede mrmox2 Nybegynder
06. oktober 2003 - 02:40 Der 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?
Avatar billede simonvalter Praktikant
06. oktober 2003 - 03:06 #1
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.

              Also refer to the  inherit permissions parameter.

              Default: directory mask = 0755

              Example: directory mask = 0775

      directory mode (S)
              Synonym for  directory mask
Avatar billede mrmox2 Nybegynder
10. oktober 2003 - 08:36 #2
tak
Avatar billede Ny bruger Nybegynder

Din løsning...

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.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester