Portál AbcLinuxu, 12. května 2025 11:27
# cat smb.conf.foo [global] workgroup = muehehe server string = %h server dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes 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 [homes] comment = Home Directories browseable = no read only = no create mask = 0700 directory mask = 0700 valid users = %S [foo] comment "test entry" path = /home/nastenka read only = no force create mask = 0777 force directory mask = 0777pripominam ze: umasky, force creation a par dalsich veci uz jsem zkousel a ze testovaci stroje maji oba cistou instalaci .. sambu poustim pomoci: `/usr/sbin/smbd -D -s /etc/samba/smb.conf.foo` pripojuju pres localhost (pro testovani) pomoci mount.cifs zdravim, ntz
Řešení dotazu:
mount.cifs
při spojení na Sambu využívá tzv. unix extensions, tj. se to snaží chovat obdobně jako NFS, a na ty různé directory mask
se nekouká. Zkusil bych v configu Samby vynutit: unix extension = no
, případně myslím, že existuje i volba pro mount.cifs
- nounix
. Tam si ale nejsem jistý, jestli to má stejný efekt.
force create mode
a force directory mode
. Samba ale myslím při startu na neznámé parametry upozorňuje…
force create mode = 664 force directory mode = 775Overit to muzete pomoci smbclienta : smbclient //server/sdileni -U user
*mode je alias jako *mask .. viz. SMB.CONF(5) ..Není.
create mode
a create mask
jsou synonyma, ale force create mode
synonymum nemá.
pkill -9 smbd /usr/sbin/smbd -D -s $cesta_k_memu_configu
mask
není mode
.
chmod
ta práva změnit, změní se?
dale chci pripomenout, ze jakekoliv vyzvy *zkus to ci ono* je mlaceni prazdne slamy neb s pouzitim meho konfiguraku a postupu uvedeneho vyse to muze *zkusit kazdy z Vas ;)Ty něco potřebuješ opravit, ale my máme něco zkoušet... jako vtip dobrý, pokud potřebuješ svůj problém vyřešit, nic moc.
rx
práva odřízne až operační systém. Zatím ale na vaši odpověď, jak to je, čekám marně.
Question: “When user B saves a word document that is owned by user A, the updated file is now owned by user B. Why is Samba doing this? How do I fix this?” Answer: Word does the following when you modify/change a Word document: MS Word creates a new document with a temporary name. Word then closes the old document and deletes it, then renames the new document to the original document name. There is no mechanism by which Samba can in any way know that the new document really should be owned by the owners of the original file. Samba has no way of knowing that the file will be renamed by MS Word. As far as Samba is able to tell, the file that gets created is a new file, not one that the application (Word) is updating. There is a workaround to solve the permissions problem. It involves understanding how you can manage file system behavior from within the smb.conf file, as well as understanding how UNIX file systems work. Set on the directory in which you are changing Word documents: chmod g+s `directory_name'. This ensures that all files will be created with the group that owns the directory. In smb.conf share declaration section set: force create mode = 0660 force directory mode = 0770 These two settings will ensure that all directories and files that get created in the share will be readable/writable by the owner and group set on the directory itself.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.