Cannot create backup file \AppData\Local\sabnzbd\sabnzbd.ini

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Kafluke
Newbie
Newbie
Posts: 5
Joined: June 20th, 2012, 2:57 pm

Cannot create backup file \AppData\Local\sabnzbd\sabnzbd.ini

Post by Kafluke » June 20th, 2012, 3:05 pm

I've gotten used to having to start over every now and then. I get SABnzbd set up properly and configured the way I want it and then this error starts showing up:

Cannot create backup file for ...\AppData\Local\sabnzbd\sabnzbd.ini (full path left off on purpose)

When I see that error I hurriedly copy the sabnzbd.ini file out of the folder listed above and save it for archiving. When SABnzbd blows up and the setup screen manifests its ugly head again I go back and copy the sabnzbd.ini file back into the profile directory and it works again. Big pain my my butt.

At first I thought it might just be this computer but it has done this on three different computers now.

Can someone tell me how to stop this from happening? I've already checked permissions and everything is good there.

I'm on Windows 7 Ultimate 64bit by the way.

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by shypike » June 21st, 2012, 3:37 am

Do you only get the message or does it prevent you from using SABnzbd?

Kafluke
Newbie
Newbie
Posts: 5
Joined: June 20th, 2012, 2:57 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by Kafluke » June 21st, 2012, 6:46 am

It starts out by filling my log full of that error. SABnzbd works fine while the error message is being written to the log but if for some reason I have to restart SABnzbd, fuhgetaboutit! It acts as if there is no sabnzbd.ini file and goes through the startup wizard again.

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by shypike » June 21st, 2012, 7:05 am

OK, this means that something is actually going wrong.
Occasionally a complaint like yours comes in, so a small minority has this.
So far the cause is completely elusive.
The only reason I can think of is that renaming the INI file to INI.BAK
is prohibited because some other program opened it (e.g. virus scanner, Windows' indexing service).
But that's no more than speculation.
I'll look into this and try to find at the least some work-around.

Kafluke
Newbie
Newbie
Posts: 5
Joined: June 20th, 2012, 2:57 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by Kafluke » June 21st, 2012, 10:26 am

Thank you so much for looking into this. I've been losing faith lately in internet forums. I post a simple question looking for help and everyone goes ape sh!t attacking me for asking in the first place. It's refreshing to find a forum where your concerns are taken seriously and addressed in a timely matter. You rock!

It's weird that I've now seen this happen on a total of three different machines. The only thing that was the same between them was that they were all running Windows 7 Ultimate Retail 64 bit with SP1.

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by shypike » June 21st, 2012, 2:10 pm

Should you happen to have SABnzbd's logging level to "info" or "debug",
the log file will contain "traceback" info, giving you more details about what actually went wrong.
Just look for the error message and the next few lines should have the actual OS error.

Currently I'm reviewing and simplifying the way backups of the INI file are made.
Also adding an important missing feature: using the BAK file when the INI file is missing or corrupt.

Kafluke
Newbie
Newbie
Posts: 5
Joined: June 20th, 2012, 2:57 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by Kafluke » June 28th, 2012, 3:34 pm

I gotta be honest with ya. Ever since posting about this I haven't seen the error... ON ANY OF MY MACHINES! Its almost as if the program knew I was getting pissed and when I posted it just... "straightened up" and starting working right. LOL.

dbrooks
Newbie
Newbie
Posts: 19
Joined: June 23rd, 2011, 11:19 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by dbrooks » July 2nd, 2012, 2:02 am

I suspect this has to do with the fact that Windows 7 sets the read-only attribute on EVERY folder, regardless, and then proceeds to ignore it. It wreaks havoc with things like sabnzbd that try to write files to that directory.

Seriously, see if your c:\program files(x86)\sabnzbd folder has the read-only attribute set. I bet it does. Try to remove that attribute. I bet you can't.

Traceback information from the log looks like this:

Code: Select all

2012-07-02 03:04:16,904::ERROR::[config:770] Cannot create backup file for C:\Program Files (x86)\SABnzbd\sabnzbd.ini

2012-07-02 03:04:16,904::INFO::[config:771] Traceback: 

Traceback (most recent call last):
  File "sabnzbd\config.pyo", line 761, in save_config
WindowsError: [Error 5] Access is denied: 'C:\\Program Files (x86)\\SABnzbd\\sabnzbd.ini.bak'
The only workaround I've been able to find is launching SABnzbd+ as an Administrator on Windows 7. Nothing else has worked.

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by shypike » July 2nd, 2012, 3:15 am

You're not supposed to write to the program folder.
Where do you keep your INI file and admin/log folder?
I hope in the user profile.
When SABnzbd sees an INI file in the program folder it falls back to ancient (rel 2.5) behaviour.
It will not try to write an INI file to the program folder spontaneously.

Kafluke
Newbie
Newbie
Posts: 5
Joined: June 20th, 2012, 2:57 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by Kafluke » July 2nd, 2012, 10:22 am

SABnzbd automatically sets itself up in the profile directory.

The file that constantly has issues being written is located here:

c:\users\<username>\AppData\Local\sabnzbd\sabnzbd.ini

That's NOT the program directory. Its inside the user profile.

dbrooks
Newbie
Newbie
Posts: 19
Joined: June 23rd, 2011, 11:19 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by dbrooks » July 2nd, 2012, 10:40 am

shypike wrote:You're not supposed to write to the program folder.
Where do you keep your INI file and admin/log folder?
I hope in the user profile.
When SABnzbd sees an INI file in the program folder it falls back to ancient (rel 2.5) behaviour.
It will not try to write an INI file to the program folder spontaneously.
You're right, my log message was after I was futzing around with it. I was still seeing the same thing in the AppData directory -- I'm still of the opinion that this is largely due to Windows 7 directory permissions.

Out of curiosity, and strictly related to the Windows port, in what locations does SABnzbd+ search for an ini file, and in what order?

User avatar
sander
Release Testers
Release Testers
Posts: 6738
Joined: January 22nd, 2008, 2:22 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by sander » July 2nd, 2012, 10:46 am

dbrooks wrote:
Out of curiosity, and strictly related to the Windows port, in what locations does SABnzbd+ search for an ini file, and in what order?
See here: http://wiki.sabnzbd.org/faq#toc18

So I would say: no searching. Just one location.

User avatar
shypike
Administrator
Administrator
Posts: 21039
Joined: January 18th, 2008, 12:49 pm

Re: Cannot create backup file \AppData\Local\sabnzbd\sabnzbd

Post by shypike » July 2nd, 2012, 11:00 am

dbrooks wrote: Out of curiosity, and strictly related to the Windows port, in what locations does SABnzbd+ search for an ini file, and in what order?
1. location given by the -f parameter
2. program folder (that's the old behaviour)
3. user profile (for Win7: c:\Users\user\AppData\Local\sabnzbd)

Post Reply