ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
Freshclam .96 fails with unwritable temp directory
thorbrian


Joined: 29 Jun 2010
Posts: 0
Reply with quote
It seems that fleshclam.exe got broke with version .96, when I run it, I get this error:
Code:
ERROR: Can't create temporary directory db\clamav-12e70e456113d4acf696edc756b4b752.000017bc.clamtmp
Hint: The database directory must be writable for UID 0 or GID 0

I think the issue is that on windows, directories are never considered writable if somebody asks (cause they have no writable body, unlike unix file systems), even when requests to create and delete and rename files in them are allowed and would succeed if attempted.

I can kind of workaround this by downloading the daily and main databases manually (i.e. without using freshclam) because the the scanner lets me specify a tempdir, but since you can't specify a tempdir with freshclam in command-line options or the conf file, I don't have any way to get freshclam to work on windows.

so is there another option for automated updates with .96? (going back to .95, it doesn't have the problem) Any chance of this issue getting fixed in .96.2?

thanks!
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
looks like write permissions might be lacking for your user account in %TEMP% folder. Can you check permissions on the TEMP folder?
View user's profileSend private message
thorbrian


Joined: 29 Jun 2010
Posts: 0
Reply with quote
It is not permissions - I made sure every permissions is allowed for all users, and like I said, .95 works. I've run freshclam from both versions, with the exact same datadir (meaning with the same permissions), and .95 worked, .96 doesn't (I discovered this trying to upgrade to .96)

Basically what .95 does is create a temp file in the database directory, while .96 apparently wants to create a temp directory in the database directory. However, when I ran filemon, I didn't see an actual attempt to create the directory though, it appears to just be checking permissions and deciding it can't do it, which is wrong cause windows will *always* say the directory is read-only, even though requests to create stuff will succeed.

I could be doing something wrong of course though - so has anyone been able to successfully run 0.96.1's freshclam on windows?
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
thorbrian wrote:
It is not permissions - I made sure every permissions is allowed for all users, and like I said, .95 works. I've run freshclam from both versions, with the exact same datadir (meaning with the same permissions), and .95 worked, .96 doesn't (I discovered this trying to upgrade to .96)

Basically what .95 does is create a temp file in the database directory, while .96 apparently wants to create a temp directory in the database directory. However, when I ran filemon, I didn't see an actual attempt to create the directory though, it appears to just be checking permissions and deciding it can't do it, which is wrong cause windows will *always* say the directory is read-only, even though requests to create stuff will succeed.

I could be doing something wrong of course though - so has anyone been able to successfully run 0.96.1's freshclam on windows?


Yes - we have about 600,000 users and your case is isolated. First time I see that

Can you try to downgrade to 0.95 and see if it still works?
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
thorbrian wrote:
It is not permissions - I made sure every permissions is allowed for all users, and like I said, .95 works. I've run freshclam from both versions, with the exact same datadir (meaning with the same permissions), and .95 worked, .96 doesn't (I discovered this trying to upgrade to .96)

Basically what .95 does is create a temp file in the database directory, while .96 apparently wants to create a temp directory in the database directory. However, when I ran filemon, I didn't see an actual attempt to create the directory though, it appears to just be checking permissions and deciding it can't do it, which is wrong cause windows will *always* say the directory is read-only, even though requests to create stuff will succeed.

I could be doing something wrong of course though - so has anyone been able to successfully run 0.96.1's freshclam on windows?


Yes - we have about 600,000 users and your case is isolated. First time I see that.

Can you try to downgrade to 0.95 and see if it still works?

There is no R/O attribute for directories in Windows API for XP or later.
View user's profileSend private message
thorbrian


Joined: 29 Jun 2010
Posts: 0
Reply with quote
Hi Alch,
Like I said, .95 works. My concern is that at some point I'll want to upgrade, but the new versions will always have problems, so I'll eventually be on an obselete version.

As far as 600,000 users goes - I'm getting this error trying to run freshclam.exe from the command-line. Do you have 600,000 users running freshclam from version 0.96.1 from the command-line? I'm pretty sure you don't...

So does ClamWin run freshclam at all?
View user's profileSend private message
GuitarBob


Joined: 09 Jul 2006
Posts: 9
Location: USA
Reply with quote
ClamWin works fine from either manual updates or scheduled updates. The **&&'55!! command line is screwed up! I can no longer get Clam tmp files myself with my old command script from which to prepare signatures. I'm reverting back to version .95 on USB to get the tmp files.

Regards,
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
thorbrian wrote:
Hi Alch,
Like I said, .95 works. My concern is that at some point I'll want to upgrade, but the new versions will always have problems, so I'll eventually be on an obselete version.

As far as 600,000 users goes - I'm getting this error trying to run freshclam.exe from the command-line. Do you have 600,000 users running freshclam from version 0.96.1 from the command-line? I'm pretty sure you don't...

So does ClamWin run freshclam at all?


Well, you did not indicate that you were doing it from the command line. Now that I know it, I can give you the cmd line which works in clamwin:
freshclam.exe --stdout --datadir=<your db dir> --log=<your log file> --config-file=<freshclam.conf>

Do you use --datadir param, if not then it might be the culprit?

Alch
View user's profileSend private message
thorbrian


Joined: 29 Jun 2010
Posts: 0
Reply with quote
sorry for not being clear on the command-line thing - I assumed freshclam was only ever run from the command line (doesn't the clamwin app download updates itself without freshclam?)

Thanks for the command line - but those are the parameters I have been using with 0.96.1, and they still give me the error. I've always specified datadir, and .96 still tries to create a temp dir within the datadir, and still claims it couldn't create the directory, even though version 0.95 was able to use the same directory, all users have full privileges on the datadir specified, and I can create directories in there from explorer myself no problem.

So have you tried running 0.96.1 freshclam from the command-line yourself yet? Did it run without error for you? If so, what's your freshclam.conf look like? mine has been this:

Code:
DNSDatabaseInfo current.cvd.clamav.net
DatabaseMirror database.clamav.net
MaxAttempts 3
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
the only difference I can see is that I also set %TEMPDIR% env variable before calling freshclam
View user's profileSend private message
g4ujs


Joined: 31 Jul 2010
Posts: 0
Reply with quote
I have exactly the same problem as thorbrian.

all previous versions including 0.96 worked fine, but problem with 0.96.1

The problem is from the commandline. and when running freshclam as a service

please fix in 96.2

ta

bob
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
it works from command line - that is how freshclam is used in clamwin.
View user's profileSend private message
sherpya


Joined: 22 Mar 2006
Posts: 0
Location: Italy
Reply with quote
I've replaced the error message with a more verbose one, new binaries here:
(I need to replace all binaries in clamwin bin directory)

http://oss.netfarm.it/clamav/ http://oss.netfarm.it/clamav/
View user's profileSend private message
sherpya


Joined: 22 Mar 2006
Posts: 0
Location: Italy
Reply with quote
I've re-updated binaries, the problem was triggered when no db path is specified at all (registry/commandline/configfile)

now it picks executable path as reference
View user's profileSend private message
good4u


Joined: 18 Aug 2010
Posts: 0
Reply with quote
Hello,
I tried your new Version 0.96.2 and want to make it portable. I used your guide and the according config-file. All works fine til the update. Here is the report:
It was produced by the portable version, but with the installed version its the same but with different paths.

ClamAV update process started at Wed Aug 18 18:32:54 2010
main.cvd is up to date (version: 52, sigs: 704727, f-level: 44, builder: sven)
Downloading daily-11557.cdiff [100%]
Downloading daily-11558.cdiff [100%]
Downloading daily-11559.cdiff [100%]
Downloading daily-11560.cdiff [100%]
Downloading daily-11561.cdiff [100%]
Downloading daily-11562.cdiff [100%]
Downloading daily-11563.cdiff [100%]
Downloading daily-11564.cdiff [100%]
Downloading daily-11565.cdiff [100%]
Downloading daily-11566.cdiff [100%]
Downloading daily-11567.cdiff [100%]
Downloading daily-11568.cdiff [100%]
Downloading daily-11569.cdiff [100%]
Downloading daily-11570.cdiff [100%]
Downloading daily-11571.cdiff [100%]
Downloading daily-11572.cdiff [100%]
Downloading daily-11573.cdiff [100%]
Downloading daily-11574.cdiff [100%]
Downloading daily-11575.cdiff [100%]
Downloading daily-11576.cdiff [100%]
Downloading daily-11577.cdiff [100%]
Downloading daily-11578.cdiff [100%]
Downloading daily-11579.cdiff [100%]
Downloading daily-11580.cdiff [100%]
Downloading daily-11581.cdiff [100%]
Downloading daily-11582.cdiff [100%]
Downloading daily-11583.cdiff [100%]
Downloading daily-11584.cdiff [100%]

ERROR: buildcld: Can't open ..\db\clamav-ae4ea9301e078b58c7c4c0d52585c3ad.00001bf4.clamtmp\clamav-3dd41a23187eac1259d1195cada3dd0d.00001bf4.clamtmp for writing

ERROR: Can't create local database



--------------------------------------

Completed

--------------------------------------
I tried it on an ntfs- and fat32 formatted usb-drive and with xpsp3 and win7-32bit and i tried it on my pe-version but the result is always the same.
I cannot update the database.
By the way freshclam Version 0.96.01 does not have these problems. It works and updates flawlessly for weeks as portable as well as installed version.
It does not matter if i am on cmd-line or if i am using winclam. The path is correct , --datadir is used, but the update fails. I can approve the
bugreport of g4ujs. Version 0.96.1 suffers from the same problem. Any Suggestions? I dont want to go back to Version 0.96.01.
To sherpya:
Can i mix your version of clamwin-binaries with the clamwin-version provided here? Or can i replace the binaries with yours?
View user's profileSend private message
Freshclam .96 fails with unwritable temp directory
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 2  

  
  
 Reply to topic