Reply
Thread Tools
Posts: 11 | Thanked: 0 times | Joined on Jun 2007
#1
Yestreday I had accidentally updated magic.sys - so now I am busy restoring all my settings.
I have custom backup config in /etc/osso-backup/applications/.
However it does not work smoothly because some files/folders require user access to be set.
That is quite boring to chmod all my dropbear, mc and other settings files (they have root-only access) after each restore.

So the question is - how to run osso-backup with root priveleges?

Running osso-backup from root terminal (xterm, sudo gainroot) does not help - nothing happens.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#2
Originally Posted by aka179 View Post
So the question is - how to run osso-backup with root priveleges?
Maybe the question is, how to restore backup with correct privileges?
Or maybe, were the original privileges of those files correct (i.e. owned by user:users and not root by your mistake)?

It seems strange to me that osso-backup running 'wrongly' as user (as you expect from your question) would restore files with root privileges.


BTW, what is magic.sys?
 
Posts: 11 | Thanked: 0 times | Joined on Jun 2007
#3
For instace dropbear (ssh server) settings are in /etc/default/dropbear file. File has root-only access. So after reflash I have to 1) restore backup 2) install dropbear-server 3) install xterm 4) run xterm and chmod /etc/default/dropbear so user can write there 5) restore backup again.

If I can run osso-backup as root - there will be just 1) restore backup 2) install apps

Read about magic.sys here:
http://www.internettablettalk.com/fo...ead.php?t=6785

Last edited by aka179; 2007-06-14 at 11:13. Reason: typo
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#4
Originally Posted by aka179 View Post
For instace dropbear (ssh server) settings are in /etc/default/dropbear file. File has root-only access. So after reflash I have to 1) restore backup 2) install dropbear-server 3) install xterm 4) run xterm and chmod /etc/default/dropbear so user can write there 5) restore backup again.
That's strange. I would guess osso-backup already runs as root since it needs to restore many files definitely not owned by user so permissions shouldn't be a problem. Check the zip files inside backup directory, there are tons of files that go to various system directories owned by root and it works, one example is /var/lib/bluetooth directory backed up by /etc/osso-backup/applications/bluez.conf. And in the restore part it is even able to kill everything, restore settings and reboot device so it really seems strange that it would run as regular user and didn't have enough permissions.

But if it really doesn't work then I don't know, never tried custom backup configurations.

Originally Posted by aka179 View Post
If I can run osso-backup as root - there will be just 1) restore backup 2) install apps
well, maybe installing apps may overwrite some restored configuration again so it can be
1) install apps
2) restore backup

anyway you should be able to run normal GUI apps as root via the run-standalone.sh which loads environment variables not set for root
 
Posts: 11 | Thanked: 0 times | Joined on Jun 2007
#5
I have no idea why other files work - while mines do not. I wish I can debug that crap to find out why that does not work.

1) install apps 2) restore backup does not help as well - (take dropbear for example)

run-standalone.sh does not work for oss-backup. The only way to launch it (found so far):
exec maemo-invoker /usr/bin/osso-backup.launch

The funny thing is that ps shows maemo-invoker running as root, with child process osso-backup.launch running as "user".

UPDATE:
Problem solved (thanks to inz at #maemo). The following command works from root console :
"run-standalone.sh maemo-summoner /usr/bin/osso-backup.launch"

PS. ahh, i feel like rocket scientist )

Last edited by aka179; 2007-06-14 at 16:44. Reason: PS
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:52.