Robin Edgar - Tripany
2007-Jan-26 16:15 UTC
[Samba] Office 2007 saves files as read only on samba shares?
I've been running the same configuration for a couple of years now,
and since I've upgraded to Office 2007, MS Word and MS Excel files
save to my samba shares as -r-------- even when they are opened as
being chmod 777. Files I create/edit using other editors or windows
explorer are put onto the share with the correct permissions.
My conf looks like this:
[global]
workgroup = WG
server string = WG machine
netbios name = WG
obey pam restrictions = Yes
password server passdb backend = smbpasswd
encrypt passwords = true
guest account = nobody
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
smb passwd file = /etc/samba/smbpasswd
log level = 2
log file = /var/log/samba/log.%m
max log size = 1000
time server = Yes
server signing = auto
socket options = IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT
add machine script = /usr/sbin/adduser --ingroup machine --system --home
/dev/null --no-create-home --force-badname %u
logon path logon home logon script = %Gnetlogon.bat
domain logons = Yes
preferred master = Yes
domain master = Yes
wins proxy = Yes
wins support = Yes
ldap ssl = no
panic action = /usr/share/samba/panic-action %d
hosts allow = 192.168.0.
profile acls = Yes
dos filetimes = Yes
[here]
comment = here
path = /export/home/here
valid users = user1, user2
valid users = @group
force group = group
read list = @group
write list = @group
read only = No
force create mode = 0770
create mask = 0770
directory mask = 0770
guest ok = No
browseable = No
In this I've never had 'force create mode' before, but adding it
hasn't helped.
[dump]
comment = dump
path = /export/home/dump
valid users = @group1, @group2
force group = group1
read only = No
create mask = 0770
Both shares will create new Office documents as being read only for
the user as well as saving over documents that were chmod 777 as 400,
but ONLY using MS Office 2007!
In the file logs for the connecting machine I get:
[2007/01/26 16:36:55, 2] smbd/open.c:open_file(245)
user opened file here/filename.xls read=Yes write=No (numopen=2)
where write /should/ be 'Yes'. Upping loglevel to 3 gives me a huge
amount of data.
I'm using samba 3.0.14a-3sarge2 (debian)
Any ideas?!
Best regards,
Robin Edgar
Tripany
tel: 070-3816462
fax: 070-3816463
web: www.tripany.com
KvK: 27191044
Robin Edgar - Tripany
2007-Jan-29 16:35 UTC
Fwd: [Samba] Office 2007 saves files as read only on samba shares?
So the situation now gets weirder the more I play with it:
If I use windows to create a file and a directory the permissions are
set properly:
machine:/export/home/here/test# ls -alp
total 12
drwxrwx--- 3 user group 4096 Jan 29 17:21 ./
drwxr-xr-x 28 root root 4096 Jan 29 17:20 ../
drwxrwx--- 2 user group 4096 Jan 29 17:21 testdir/
-rwxrwx--- 1 user group 0 Jan 29 17:21 testtxt.txt
When I create a word (or excel) document and save it, I get this:
machine:/export/home/here/test# ls -alp
total 28
drwxrwx--- 3 user group 4096 Jan 29 17:24 ./
drwxr-xr-x 28 root root 4096 Jan 29 17:20 ../
-r-------- 1 user group 10246 Jan 29 17:24 Testdoc.docx
drwxrwx--- 2 user group 4096 Jan 29 17:21 testdir/
-rwxrwx--- 1 user group 0 Jan 29 17:21 testtxt.txt
-rwxrwx--- 1 user group 162 Jan 29 17:24 ~$estdoc.docx
Note 2 things: the swapfile has the correct permissions, the .docx
doesn't.
If I chmod 770 the Testdoc.docx, then re-open and re-save it, the same
happens as above. HOWEVER!
If I chmod 777 Testdoc.docx, and then re-open and re-save I get these
permissions.
machine:/export/home/here/test# ls -alp
total 28
drwxrwx--- 3 user group 4096 Jan 29 17:28 ./
drwxr-xr-x 28 root root 4096 Jan 29 17:20 ../
-rwxrwxrwx 1 user group 10278 Jan 29 17:28 Testdoc.docx
drwxrwx--- 2 user group 4096 Jan 29 17:21 testdir/
-rwxrwx--- 1 user group 0 Jan 29 17:21 testtxt.txt
-rwxrwx--- 1 user group 162 Jan 29 17:27 ~$estdoc.docx
Not so strange, except create mask = 0770.
What really wierds me out is when I chmod 775 Testdoc.docx and re-edit
and save it:
machine:/export/home/here/test# ls -alp
total 28
drwxrwx--- 3 user group 4096 Jan 29 17:31 ./
drwxr-xr-x 28 root root 4096 Jan 29 17:20 ../
-r-xr-xr-x 1 user group 10322 Jan 29 17:31 Testdoc.docx
drwxrwx--- 2 user group 4096 Jan 29 17:21 testdir/
-rwxrwx--- 1 user group 0 Jan 29 17:21 testtxt.txt
-rwxrwx--- 1 user group 162 Jan 29 17:31 ~$estdoc.docx
Can anyone please explain this behaviour?!
This is a forwarded message
From: Robin Edgar - Tripany <red@tripany.com>
To: samba@lists.samba.org
Date: Friday, January 26, 2007, 4:53:40 PM
Subject: [Samba] Office 2007 saves files as read only on samba shares?
===8<==============Original message text==============I've been running
the same configuration for a couple of years now,
and since I've upgraded to Office 2007, MS Word and MS Excel files
save to my samba shares as -r-------- even when they are opened as
being chmod 777. Files I create/edit using other editors or windows
explorer are put onto the share with the correct permissions.
My conf looks like this:
[global]
workgroup = WG
server string = WG machine
netbios name = WG
obey pam restrictions = Yes
password server passdb backend = smbpasswd
encrypt passwords = true
guest account = nobody
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n .
smb passwd file = /etc/samba/smbpasswd
log level = 2
log file = /var/log/samba/log.%m
max log size = 1000
time server = Yes
server signing = auto
socket options = IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT
add machine script = /usr/sbin/adduser --ingroup machine --system --home
/dev/null --no-create-home --force-badname %u
logon path logon home logon script = %Gnetlogon.bat
domain logons = Yes
preferred master = Yes
domain master = Yes
wins proxy = Yes
wins support = Yes
ldap ssl = no
panic action = /usr/share/samba/panic-action %d
hosts allow = 192.168.0.
profile acls = Yes
dos filetimes = Yes
[here]
comment = here
path = /export/home/here
valid users = user1, user2
valid users = @group
force group = group
read list = @group
write list = @group
read only = No
force create mode = 0770
create mask = 0770
directory mask = 0770
guest ok = No
browseable = No
In this I've never had 'force create mode' before, but adding it
hasn't helped.
[dump]
comment = dump
path = /export/home/dump
valid users = @group1, @group2
force group = group1
read only = No
create mask = 0770
Both shares will create new Office documents as being read only for
the user as well as saving over documents that were chmod 777 as 400,
but ONLY using MS Office 2007!
In the file logs for the connecting machine I get:
[2007/01/26 16:36:55, 2] smbd/open.c:open_file(245)
user opened file here/filename.xls read=Yes write=No (numopen=2)
where write /should/ be 'Yes'. Upping loglevel to 3 gives me a huge
amount of data.
I'm using samba 3.0.14a-3sarge2 (debian)
Any ideas?!
Best regards,
Robin Edgar
Tripany
tel: 070-3816462
fax: 070-3816463
web: www.tripany.com
KvK: 27191044
===8<===========End of original message text===========
Robin Edgar - Tripany
2007-Feb-26 10:10 UTC
[Samba] Office 2007 saves files as read only on samba shares?
More people are suffering from this problem: http://lists.samba.org/archive/samba/2007-January/128794.html ([Samba] What Happened to my SAMBA? Permissions Issue) and http://lists.samba.org/archive/samba/2007-February/129778.html ([Samba] File Locking) Friday, January 26, 2007, 4:53:40 PM, schreef jij:> I've been running the same configuration for a couple of years now, > and since I've upgraded to Office 2007, MS Word and MS Excel files > save to my samba shares as -r-------- even when they are opened as > being chmod 777. Files I create/edit using other editors or windows > explorer are put onto the share with the correct permissions.> My conf looks like this: > [global] > workgroup = WG > server string = WG machine > netbios name = WG > obey pam restrictions = Yes > password server > passdb backend = smbpasswd > encrypt passwords = true > guest account = nobody > passwd program = /usr/bin/passwd %u > passwd chat = *Enter\snew\sUNIX\spassword:* %n\n > *Retype\snew\sUNIX\spassword:* %n\n . > smb passwd file = /etc/samba/smbpasswd > log level = 2 > log file = /var/log/samba/log.%m > max log size = 1000 > time server = Yes > server signing = auto > socket options = IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT > add machine script = /usr/sbin/adduser --ingroup machine > --system --home /dev/null --no-create-home --force-badname %u > logon path > logon home > logon script = %Gnetlogon.bat > domain logons = Yes > preferred master = Yes > domain master = Yes > wins proxy = Yes > wins support = Yes > ldap ssl = no > panic action = /usr/share/samba/panic-action %d > hosts allow = 192.168.0. > profile acls = Yes > dos filetimes = Yes> [here] > comment = here > path = /export/home/here > valid users = user1, user2 > valid users = @group > force group = group > read list = @group > write list = @group > read only = No > force create mode = 0770 > create mask = 0770 > directory mask = 0770 > guest ok = No > browseable = No> In this I've never had 'force create mode' before, but adding it > hasn't helped.> [dump] > comment = dump > path = /export/home/dump > valid users = @group1, @group2 > force group = group1 > read only = No > create mask = 0770> Both shares will create new Office documents as being read only for > the user as well as saving over documents that were chmod 777 as 400, > but ONLY using MS Office 2007!> In the file logs for the connecting machine I get: > [2007/01/26 16:36:55, 2] smbd/open.c:open_file(245) > user opened file here/filename.xls read=Yes write=No (numopen=2)> where write /should/ be 'Yes'. Upping loglevel to 3 gives me a huge > amount of data.> I'm using samba 3.0.14a-3sarge2 (debian)> Any ideas?!> Best regards, > Robin Edgar > Tripany> tel: 070-3816462 > fax: 070-3816463 > web: www.tripany.com > KvK: 27191044
Robin Edgar - Tripany
2007-Feb-26 13:32 UTC
[Samba] Office 2007 saves files as read only on samba shares? [solved]
It turns out that profile acls = Yes in the [globals] section caused my problem. Removing it solved the problem. Friday, January 26, 2007, 4:53:40 PM, schreef jij:> I've been running the same configuration for a couple of years now, > and since I've upgraded to Office 2007, MS Word and MS Excel files > save to my samba shares as -r-------- even when they are opened as > being chmod 777. Files I create/edit using other editors or windows > explorer are put onto the share with the correct permissions.> My conf looks like this: > [global] > workgroup = WG > server string = WG machine > netbios name = WG > obey pam restrictions = Yes > password server > passdb backend = smbpasswd > encrypt passwords = true > guest account = nobody > passwd program = /usr/bin/passwd %u > passwd chat = *Enter\snew\sUNIX\spassword:* %n\n > *Retype\snew\sUNIX\spassword:* %n\n . > smb passwd file = /etc/samba/smbpasswd > log level = 2 > log file = /var/log/samba/log.%m > max log size = 1000 > time server = Yes > server signing = auto > socket options = IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT > add machine script = /usr/sbin/adduser --ingroup machine > --system --home /dev/null --no-create-home --force-badname %u > logon path > logon home > logon script = %Gnetlogon.bat > domain logons = Yes > preferred master = Yes > domain master = Yes > wins proxy = Yes > wins support = Yes > ldap ssl = no > panic action = /usr/share/samba/panic-action %d > hosts allow = 192.168.0. > profile acls = Yes > dos filetimes = Yes> [here] > comment = here > path = /export/home/here > valid users = user1, user2 > valid users = @group > force group = group > read list = @group > write list = @group > read only = No > force create mode = 0770 > create mask = 0770 > directory mask = 0770 > guest ok = No > browseable = No> In this I've never had 'force create mode' before, but adding it > hasn't helped.> [dump] > comment = dump > path = /export/home/dump > valid users = @group1, @group2 > force group = group1 > read only = No > create mask = 0770> Both shares will create new Office documents as being read only for > the user as well as saving over documents that were chmod 777 as 400, > but ONLY using MS Office 2007!> In the file logs for the connecting machine I get: > [2007/01/26 16:36:55, 2] smbd/open.c:open_file(245) > user opened file here/filename.xls read=Yes write=No (numopen=2)> where write /should/ be 'Yes'. Upping loglevel to 3 gives me a huge > amount of data.> I'm using samba 3.0.14a-3sarge2 (debian)> Any ideas?!> Best regards, > Robin Edgar > Tripany> tel: 070-3816462 > fax: 070-3816463 > web: www.tripany.com > KvK: 27191044
Maybe Matching Threads
- Samba4 DC/AD documents created in redirected folders with bogus UID
- interaction with C++ code (PR#10487)
- Samba PDC + XP: still not solved?
- Accessing an object from the function in its .Data slot?
- Samba4 DC/AD documents created in redirected folders with bogus UID