Rechte beim Anlegen von Dateien via Samba-Client nicht korrekt gesetzt

T

tmwbr

Grünschnabel
Hallo,

ich habe einen Samba-Server aufgesetzt und die beiden im Folgenden beschriebenen Freigaben in der smb.conf definiert. Neu angelegte Dateien erhalten genau die Rechte, die sie haben sollen. Nur bei Ordnern funktioniert das nicht, hier fehlt immer das Schreibrecht für die Gruppe bzw. für alle anderen Benutzer.

Code:
[Pool]
path = /Files/Pool
comment = Pool
available = yes
guest ok = yes
writable = yes
# Rechte
create mask = 0777
force create mode = 0777
directory mask = 0777
force directory mode = 0777
security mask = 0777
force security mode = 0777
directory security mask = 0777
force directory security mode = 0777

[Privat]
path = /Files/Privat
valid users = klara,tom
force group = meiers
available = yes
guest ok = no
writable = yes
# Rechte
create mask = 0660
force create mode = 0660
directory mask = 0770
force directory mode = 0770
security mask = 0660
force security mode = 0660
directory security mask = 0770
force directory security mode = 0770

Die Auflistung der Ordnerinhalte auf der Konsole zeigt dann:

Code:
cd /Daten/Pool
ls

drwxrwxrwx 15 root    users    4096 Aug 20 22:17 ./
drwxr-xr-x  9 root    root     4096 Aug 16 17:28 ../
-rwxrwxrwx  1 tom     meiers      2 Mai 20  2011 file*
[COLOR="#B22222"]drwxr-xr-x[/COLOR]  2 tom     meiers   4096 Aug 20 22:17 folder/

Code:
cd /Daten/Privat
ls

drwxrwx--- 3 root meiers 4096 Aug 20 22:17 ./
drwxr-xr-x 9 root root   4096 Aug 16 17:28 ../
-rw-rw---- 1 tom  meiers    2 Mai 20  2011 file
[COLOR="#B22222"]drwxr-x---[/COLOR] 2 tom  meiers 4096 Aug 20 22:17 folder/

Die Dateien/Ordner wurden in diesem Fall mit einem Linux-Client angelegt, bei einem Windows-Client ist das Ergebnis jedoch identisch.

* Die Version des Samba-Server: 3.6.3
* OS: Linux server 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Bei Bedarf kann ich natürlich noch weitere Angaben zur Konfiguration angeben.

Vielen Dank für eure Hilfe,
Tom
 
Zuletzt bearbeitet:
"[global]" Abschnitt

Ohne "[global]" Abschnitt ist Hilfe schwer.

Bitte die Ausgabe von

Code:
sudo /usr/bin/testparm
 
Hallo und danke für die Hilfe.

Hier die komplette smb.conf (Zeilen, die nur Kommentare enthalten, habe ich entfernt - auskommentierte Settings habe ich stehen lassen):

Code:
#======================= Global Settings =======================

[global]

   workgroup = Arbeitsgruppe
   server string = %h server (Samba, Ubuntu)
;   wins server = w.x.y.z
   dns proxy = no
;   name resolve order = lmhosts host wins bcast
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes

#### Debugging/Accounting ####
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d

####### Authentication #######

   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = no
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   guest account = nobody
   invalid users = root

########## Domains ###########

;   domain logons = yes
;   logon path = \\%N\profiles\%U
;   logon drive = H:
;   logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g

########## Printing ##########

;   printing = bsd
;   printcap name = /etc/printcap
;   printing = cups
;   printcap name = cups

############ Misc ############

;   include = /home/samba/etc/smb.conf.%m
   socket options = TCP_NODELAY
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash
;   winbind enum groups = yes
;   winbind enum users = yes
;   usershare max shares = 100
   usershare allow guests = no
   unix extensions = no

#======================= Share Definitions =======================

;[homes]
;   comment = Home Directories
;   browseable = no
;   read only = yes
;   create mask = 0700
;   directory mask = 0700
;   valid users = %S

;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

;[printers]
;   comment = All Printers
;   browseable = no
;   path = /var/spool/samba
;   printable = yes
;   guest ok = no
;   read only = yes
;   create mask = 0700

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba servers CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = yes

;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom

[Pool]
path = /Daten/Pool
comment = Pool
available = yes
guest ok = yes
writable = yes
# Rechte
create mask = 0777
force create mode = 0777
directory mask = 0777
force directory mode = 0777
security mask = 0777
force security mode = 0777
directory security mask = 0777
force directory security mode = 0777

[Privat]
path = /Daten/Privat
valid users = klara,tom
force group = meiers
available = yes
guest ok = no
writable = yes
# Rechte
create mask = 0660
force create mode = 0660
directory mask = 0770
force directory mode = 0770
security mask = 0660
force security mode = 0660
directory security mask = 0770
force directory security mode = 0770

Hier die Ausgabe von testparm:
Code:
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Pool]"
Processing section "[Privat]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Ich habe mich bei der Samba-Konfiguration an diesen Blogeintrag gehalten: http://blog.jonaspasche.com/2010/11/24/endlich-verstehen-samba-rechtevergabe/

Gruß,
Tom
 
Zuletzt bearbeitet:

Ähnliche Themen

Samba 4.5.12-Debian Rechtevergabe

Problem mit Win-Zugriff auf SAMBA

ganze Netzwerkumgebung schagartig unsichtbar - 0S 13.1

Falsche Rechte gesetzt beim Anlegen von Ordnern via Samba-Client

Samba 4 Gast Zugang unter Ubuntu funktioniert nicht

Zurück
Oben