Author Topic: [solved] Can not "save as" .vsd files in Samba Shares  (Read 3191 times)

cjnicol

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
[solved] Can not "save as" .vsd files in Samba Shares
« on: January 22, 2014, 12:08:14 am »
 I have copied a significant amount of data to a new Zentyal server (Version 3.3).  I did it through a windows interface into the shared folders.  I am having trouble doing a "save as" of all of my .vsd (Visio 2002 Files).  I can open the files, and I can modify the files and save them over themselves, but if I try to do a save as, I get an error that says "The folder is marked as 'Read Only'".

I can open and save any other type of file to this point.  I have turned off the Antivirus thinking that could be part of the cause with no luck.

This is an old version of Visio and there could be some issue with Visio, but I have been using Linux boxes for numerous years with no issues.

Any suggestions would be appreciated.

Chris Nicol
« Last Edit: March 11, 2014, 04:51:13 pm by jbahillo »

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #1 on: January 27, 2014, 04:52:56 am »
Hi everyone and thanks in advance for your time.

I'm experiencing the same problem on a mixed network (Zentyal Community Edition 3.3.2 with WinXP sp3 clients fully updated, Office 2003/2010).

I'm experiencing the same issue with Word and Excel 2003, but MSOffice2010 users are also complaining.  Spent the entire night googling but it seems there's no easy way out, the solutions seems to be stopping the antivirus service (which i also tried without results) or changing the way samba handles locks via /usr/share/zentyal/stubs/samba/smb.conf.mas (still nothing changed).

When checking the directory permissions with ls -l the output is:

drwxrwx---+ 2 ebox   __USERS__ 4,0K gen 27 04:20 test

which seems correct.

ls -l on the folder content shows:

-rwxrwx---+ 1 ebox   __USERS__ 18K gen 27 02:48 Copia di Nuovo Foglio di lavoro di Microsoft Office Excel 97-2003.xls
-rwxrwx---+ 1 x.moro __USERS__ 17K gen 27 04:11 Nuovo Foglio di lavoro di Microsoft Office Excel 97-2003.xls

x.moro is the user which first copied the file into this folder, but since the issue shows with both files seems to be unrelated who the owner is.

I'm attaching my samba.log (which shows my frustrating night activity) and (unmodified) smb.conf.

I'm stuck with this, any help would be precious!

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" MSoffice files in Samba Shares
« Reply #2 on: January 28, 2014, 04:56:39 am »
Anyone? I'm thinking about reporting it as a bug.

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #4 on: February 06, 2014, 03:11:15 pm »
Moved to https://bugs.zentyal.org/issues/76

Hope this receives some kind of feedback sooner or later.

stm999999999

  • Zen Warrior
  • ***
  • Posts: 101
  • Karma: +3/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #5 on: February 06, 2014, 03:20:59 pm »
I am not sure (and perhaps I remember wrong), but it sounds like a problem I heard before: perhaps something with antivirus? Is this activated on your zentyal?


third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #6 on: February 23, 2014, 11:14:54 pm »
Removing the antivirus module does not help. Also rebooted the server after that, no good news either.

vawkes

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +4/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #7 on: February 24, 2014, 06:05:17 pm »

When checking the directory permissions with ls -l the output is:

drwxrwx---+ 2 ebox   __USERS__ 4,0K gen 27 04:20 test

which seems correct.

ls -l on the folder content shows:

-rwxrwx---+ 1 ebox   __USERS__ 18K gen 27 02:48 Copia di Nuovo Foglio di lavoro di Microsoft Office Excel 97-2003.xls
-rwxrwx---+ 1 x.moro __USERS__ 17K gen 27 04:11 Nuovo Foglio di lavoro di Microsoft Office Excel 97-2003.xls



I would check the ACls on those files using getfacl. Samba will use ACL over the native Linux permissions.

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #8 on: February 24, 2014, 07:00:49 pm »
Thanks for your reply. I forgot to post the result of getfacl before, but the output showed correct permissions on all files.

From what I've understood the issue arises when MSOffice creates the temp file (in which the user is working) with the wrong permissions. The "save as" function tries to rename this temp file into 'whatever.doc', samba (correctly) denies that operation.

Following that hypothesis I'll put a script in cron to reset permissions on all .tmp files.

I'm crossing my fingers.

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #9 on: February 24, 2014, 07:28:04 pm »
By the way, does anybody knows some best practice for crontab in latest Zentyal? Is the usual 'crontab -e' the right way to do the job?

vawkes

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +4/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #10 on: February 24, 2014, 10:14:03 pm »
By the way, does anybody knows some best practice for crontab in latest Zentyal? Is the usual 'crontab -e' the right way to do the job?


If crontab -e is wrong, then I don't want to be right.

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #11 on: February 27, 2014, 01:45:52 pm »
What i meant was: is there some pre built system in Zentyal which prevents me from using crontab the usual way?

Still, best answer ever man.  ;D

Haven't had the time to try, i'll do that probably tonight, 'cause sleeping is for pussies. Thanks vawkes.

third

  • Zen Apprentice
  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #12 on: March 07, 2014, 11:09:45 am »
Wrong way from what it seems.

a getfacl on any temp created by office returns:

Code: [Select]
# owner: x.moro
# group: __USERS__
user::rw-
user:root:rwx #effective:rw-
user:3000000:rwx #effective:rw-
user:3000002:rwx #effective:rw-
user:Admin:rwx #effective:rw-
user:3000095:rwx #effective:rw-
group::---
group:Administrators:rwx #effective:rw-
group:3000002:rwx #effective:rw-
group:AMMINISTRAZIONE:rwx #effective:rw-
mask::rw-
other::---

Everything seems to be ok, but I'm still experiencing the problem. I'm totally hopeless now.

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #13 on: March 09, 2014, 12:36:07 pm »
Hi guys:

/etc/zentyal/samba.conf

Leave it like this one:

https://github.com/Zentyal/zentyal/blob/jbahillo/clamav-samba/main/samba/conf/samba.conf

That should solve your issue. The problem is not permissions actuallky but those Windows programs generating temp files that only survive several microseconds so antivirus cannot scan them

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: Can not "save as" .vsd files in Samba Shares
« Reply #14 on: March 09, 2014, 12:37:25 pm »
BTW you should be able to add new cron jobs under cron.d cron.daily, cron.monthly... or in crontabs, As long as you donot edit any existent file there should not any reason to do so