Backup over ssh : Permission denied

Bug #512007 reported by DiQ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nssbackup
Fix Released
High
Oumar Aziz OUATTARA

Bug Description

Using nssbackup_0.2-0~rc8 on karmic which includes a fix for Question 96168 (https://answers.launchpad.net/nssbackup/+question/96168).

When I click Test on ssh://USER:PASSWORD@SERVER:NNNNN/PATH I get "Test Succeeded !"

However when I try and backup I get a box appear with:

NSSBackup [Default Profile]
An error occured: '[Errno 13] Permission denied: '/mnt/nssbackup/ssh_USER@SERVER_NNNNN/PATH''

Log gives me :

2010-01-24 15:54:19,828 - ERROR - nssbackupd.py:__onError(226) - [Errno 13] Permission denied: '/mnt/nssbackup/ssh_USER@SERVER_NNNNN/PATH'
2010-01-24 15:54:19,830 - ERROR - nssbackupd.py:__onError(227) - Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/nssbackup/nssbackupd.py", line 217, in run
    self.__bm.makeBackup()
  File "/usr/local/lib/python2.6/dist-packages/nssbackup/managers/BackupManager.py", line 277, in makeBackup
    self.__checkTarget()
  File "/usr/local/lib/python2.6/dist-packages/nssbackup/managers/BackupManager.py", line 615, in __checkTarget
    FAM.makedir(self.config.get("general","target"))
  File "/usr/local/lib/python2.6/dist-packages/nssbackup/managers/FileAccessManager.py", line 61, in makedir
    os.makedirs( target, 0750 )
  File "/usr/lib/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/mnt/nssbackup/ssh_USER@SERVER_NNNNN/PATH'

No backup is made, and so this prevents me from using NSSBackup

DiQ (dik23)
description: updated
summary: - nssbackupd.py : Permission denied
+ Backup over ssh : Permission denied
Changed in nssbackup:
assignee: nobody → Oumar Aziz OUATTARA (wattazoum)
Revision history for this message
DiQ (dik23) wrote :

Have just tried this on a different machine and it's not a problem when using port 22, only when using other ports

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Hum ! This is a very useful information, I will try testing this home.

Revision history for this message
DiQ (dik23) wrote :

I have also discovered that if you enter ssh://user:password@server/path there is no problem

However if you enter ssh://user:password@server:22/path there is a problem

It is the :NNNNN that is causing the issue whatever the port number

Revision history for this message
DiQ (dik23) wrote :

I have also noticed that there's a problem running the program from the SYSTEM > ADMIN menu, but this maybe another bug

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

I have succeeded reproducing the problem. this happens only when using root (admin account).

Changed in nssbackup:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
DiQ (dik23) wrote :

After this error happens it seems impossible to open NSSBackup as root again, even after a "complete removal" and re-install using Synaptic.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

can you try using on a shell:

sudo nssbackup-config-gui

You should see some information print and the cause of the error should be part of it.

Changed in nssbackup:
status: Confirmed → In Progress
Revision history for this message
DiQ (dik23) wrote :

Ok - give me a little bit. I have already done this and recorded the result but before I could post here the machine I was testing on has had it's graphics card fail. I will set up another later on today and get back to you

Revision history for this message
DiQ (dik23) wrote :

Here you go :

ubuntu@ubuntu:~$ gksu nssbackup-config-gui
(nssbackup-config-gui:5460): libglade-WARNING **: could not look up stock id 'Profile Manager'
/usr/lib/python2.6/dist-packages/nssbackup/ui/GladeGnomeApp.py:74: GtkWarning: gtk_tree_model_get_n_columns: assertion `GTK_IS_TREE_MODEL (tree_model)' failed
  self.xml = gtk.glade.XML(fname,domain='nssbackup')
/usr/lib/python2.6/dist-packages/nssbackup/ui/GladeGnomeApp.py:74: GtkWarning: gtk_combo_box_set_column_span_column: assertion `column_span >= -1 && column_span < col' failed
  self.xml = gtk.glade.XML(fname,domain='nssbackup')
/usr/lib/python2.6/dist-packages/nssbackup/ui/GladeGnomeApp.py:74: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.xml = gtk.glade.XML(fname,domain='nssbackup')
/usr/lib/python2.6/dist-packages/nssbackup/ui/SBConfigGTK.py:1651: DeprecationWarning: Use the new widget gtk.Tooltip
  gtk.tooltips_data_get(self.widgets["eventbox"])[0].set_tip(self.widgets["eventbox"], _("Please test writability of the target directory by pressing \"Test\" button on the right."))
Traceback (most recent call last):
  File "/usr/bin/nssbackup-config-gui", line 37, in <module>
    main(sys.argv)
  File "/usr/lib/python2.6/dist-packages/nssbackup/ui/SBConfigGTK.py", line 1951, in main
    w = SBconfigGTK()
  File "/usr/lib/python2.6/dist-packages/nssbackup/ui/SBConfigGTK.py", line 195, in __init__
    self.prefillWindow()
  File "/usr/lib/python2.6/dist-packages/nssbackup/ui/SBConfigGTK.py", line 614, in prefillWindow
    self.widgets["loglevelcombobox"].set_active(self.loglevels[self.configman.get("log", "level")][1])
KeyError: '40'
ubuntu@ubuntu:~$

Revision history for this message
DiQ (dik23) wrote :

I did a Synaptic "complete removal" including the following that are installed along with NSSBackup :

curlftpfs
python-pexpect
sshfs

When re-installed NSSBackup still won't run and gives an identical error as above.

Revision history for this message
DiQ (dik23) wrote :

I am now testing using a persistent USB install and so can get back to having NSSBackup installed and working by replacing the casper-rw file with one that I'd backed up.

The above problem only happens after I move the log file (under Report) to my desktop from /var/log/

I had done this to make the log easier to view and am not sure if this is a bug

Revision history for this message
DiQ (dik23) wrote :

Actually maybe it's not moving the log location - maybe it is setting it to "error" that is the problem

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

I confirm that it is setting the log level to ERROR that creates the problem. When loading the nssbackup config window, the key "40" is not found at one point.

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

Can you try with this one? The UI should start now.

Revision history for this message
DiQ (dik23) wrote :

does this solve the ssh problem too ?

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

no, I am still trying to find the ssh problem cause out.

Revision history for this message
DiQ (dik23) wrote :

The GUI now starts with log set to error

It also starts with all of the other log levels

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

This one should solve the SSH problem. Can you test it ? I hope that it works :-)

Revision history for this message
DiQ (dik23) wrote :

Yep, all works !

Thanks for sorting that out, you're a star

If I have any questions or find any bugs I'll get straight back to you ;0)

Revision history for this message
DiQ (dik23) wrote :

Oh - in answer to your previous question - on of the things I'd like to see in v0.3 is the ability to restore more than one folder at a time.

Also it would be nice to be able to return to an inc backup point without having to start at a ful and make the way through all of the preceding incs.

Just an idea

Changed in nssbackup:
status: In Progress → Fix Committed
milestone: none → release0.2
Revision history for this message
Anton (feenstra) wrote : Re: [Nssbackup-team] [Bug 512007] Re: Backup over ssh : Permission denied

dik23 wrote:
> Oh - in answer to your previous question - on of the things I'd like to
> see in v0.3 is the ability to restore more than one folder at a time.
>
> Also it would be nice to be able to return to an inc backup point
> without having to start at a ful and make the way through all of the
> preceding incs.

Yes, I second that. In fact, I'd propose a restore browser that shows
your complete filespace, and shows which backups there are for each
file. Default restore would be the latest, from whichever set it comes.

--
Groetjes,

Anton
  _____________ _______________________________________________________
| | |
| _ _ ___,| K. Anton Feenstra |
| / \ / \'| | | IBIVU/Bioinformatics - Free University Amsterdam |
|( | )| | | De Boelelaan 1083A - 1081 HV Amsterdam - Netherlands |
| \_/ \_/ | | | Tel +31 20 59 87783 - Fax +31 20 59 87653 - Room P136 |
| | <email address hidden> - www.few.vu.nl/~feenstra/ |
| | "Your Proposal is Accepted" (Men In Black) |
|_____________|_______________________________________________________|

Revision history for this message
Oumar Aziz OUATTARA (wattazoum) wrote :

@Anton: I have created a blueprint for this feature.
https://blueprints.launchpad.net/nssbackup/+spec/revert-to-a-date/

Changed in nssbackup:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.