Solved

Office 2007 changes acl file permissions on a Samba server

Posted on 2010-09-16
3
679 Views
Last Modified: 2012-05-10
I took a .xls file and set the following permissions as seen by getfacl

# file: test.xls
# owner: root
# group: users
user::rwx
user:root:rwx
user:administrator:rw-
group::rw-
group:users:rw-
group:domain\040users:rw-
mask::rwx
other::---

Then I opened the file using Excel 2007, changed it, saved it and this is what I get afterwards

# file: test.xls
# owner: gjohn
# group: domain\040users
user::rw-
user:root:rwx
user:administrator:rw-
group::rw-
group:users:rw-
mask::rwx
other::---

I tested a plain text file using vim connecting to the share over NFS and using notepad over SMB and neither modify the acl permissions so I can only assume that Excel is to blame. Is there anyway to prevent this from happening?
0
Comment
Question by:coanda
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
ProfessorBindokas earned 500 total points
ID: 33699893
Hi, thanks for asking this question, since it's one that caused me to pull out quite a few hairs in the past.  Unfortunately, it's not an Excel issue, but a problem common to Microsoft Office and OpenOffice in general.  Our view is that the problem is caused by Office's specific way of handling files - when opened for editing, a temporary file is created while editing and when a save occurs, the temp file is converted, completely replacing the existing file with a new version, effectively overwriting the ACL.

Found no way of handling this on SAMBA, since file replacing is a fully "acceptable" operation for the server itself.  The only way we found around it in term of preserving file ownership information was to start using a subversion system in lieu of a simple fileserver.  That gave full control for access plus info on who created, edited, when, etc.
0
 
LVL 3

Author Comment

by:coanda
ID: 33703390
I will agree that this problem plagues all versions of Office/Excel, but not Office type files in general. As can be seen below OOo has no problems from Windows or Linux preserving ACL file permissions.

Using OpenOffice.org 3.2 from Ubuntu 10.04

acl permissions before save:
-----------------------------------

gjohn@gjohn:/mnt/public/archive$ getfacl test.xls
# file: test.xls
# owner: root
# group: users
user::rw-
user:administrator:rw-
user:gjohn:rw-
group::rw-
group:users:rw-
group:domain\040users:rw-
mask::rwx
other::---

acl permissions after save:
---------------------------------

gjohn@gjohn:/mnt/public/archive$ getfacl test.xls
# file: test.xls
# owner: root
# group: users
user::rw-
user:administrator:rw-
user:gjohn:rw-
group::rw-
group:users:rw-
group:domain\040users:rw-
mask::rwx
other::---

Using OpenOffice.org 3.0 from Windows XP

acl permissions after save:
--------------------------------

gjohn@gjohn:/mnt/public/archive$ getfacl test.xls
# file: test.xls
# owner: root
# group: users
user::rw-
user:administrator:rw-
user:gjohn:rw-
group::rw-
group:users:rw-
group:domain\040users:rw-
mask::rwx
other::---

Using Excel 2002 SP3 from Windows XP

acl permissions after save:
---------------------------------

gjohn@gjohn:/mnt/public/archive$ getfacl test.xls
# file: test.xls
# owner: gjohn
# group: domain\040users
user::rw-
user:root:rw-
user:administrator:rw-
group::rw-
group:users:rw-
mask::rwx
other::---

I personally use a version control system for the work that I do, but asking your coworkers to completely change the way they work is not always greeted with enthusiasm.
0
 
LVL 3

Author Closing Comment

by:coanda
ID: 33736937
Unfortunately I've not been able to find any better information WRT my problem.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
Outlook Free & Paid Tools
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now