Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: cjnicol on January 22, 2014, 12:08:14 am

Title: [solved] Can not "save as" .vsd files in Samba Shares
Post by: cjnicol 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
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third 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!
Title: Re: Can not "save as" MSoffice files in Samba Shares
Post by: third on January 28, 2014, 04:56:39 am
Anyone? I'm thinking about reporting it as a bug.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third on January 29, 2014, 05:08:09 pm
http://trac.zentyal.org/ticket/8105 (http://trac.zentyal.org/ticket/8105)
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third 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.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: stm999999999 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?

Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third 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.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: vawkes 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.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third 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.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third 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?
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: vawkes 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.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third 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.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third 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.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: jbahillo 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
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: jbahillo 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
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third on March 09, 2014, 05:40:33 pm
/etc/zentyal/samba.conf is periodically overwritten by some obscure periodical zentyal process, taking /usr/share/zentyal/stubs/samba/smb.conf.mas as the template, so every modification should be made through this file or is going to be lost as soon as zentyal decides to do so.

I guess the -- antivirus settings -- is the part which concerns me, still can't figure out how to change the template to get the opportune modifications in smb.conf.

Btw couldn't understand what you meant in the last post, you mean there's no need to modify existent cron files?
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: jbahillo on March 09, 2014, 06:00:37 pm
Hello

Do not confuse /etc/zentyal/samba.conf ( not overwritten by zentyal) with /etc/samba/smb.conf ( overwritten con module restarts taking TVE mas file you mention as the templete


Regarding cron jobs, if you need to add one insert it in a new file, instead os adding it to any one that might existe. If you do not do so, that file might be overwritten con a module restart and you would lose your cron job
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: pcready.cl on March 11, 2014, 02:27:20 pm
A new version of samba was released today (4.1.5).

Update your samba and see if you still have the same error.
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third on March 11, 2014, 04:38:30 pm
This actually solved the problem, a HUGE thank you jbahillo.

The only thing i changed was the
Code: [Select]
allow_nonscanned_files parameter to 'true'.

I'd like to update the status here (https://tracker.zentyal.org/issues/76) with the correct workaround, but don't know how. Also we can consider this thread closed. Thanks again!
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: jbahillo on March 11, 2014, 04:43:11 pm
I'll notify the devel involved. Please stamp this forum thread as [solved]

BR ;)
Title: Re: Can not "save as" .vsd files in Samba Shares
Post by: third on March 11, 2014, 04:49:35 pm
Don't see how to stamp it as solved, maybe because someone else opened the thread?