View Full Version : Problem in accessing root home folder....

02-13-2008, 05:37 AM

I am developing the application on which execution create (settings.xml) a file which saves some information and saved in home folder of every user.....example If I logged in as bargi then the settings.xml will save in /home/bargi/Settings/settings.xml...... and when application restart then it read settings from this xml file.

Again when I logged in as root the file saved in /root/Settings/settings.xml.

I want to know that If I am logged in as user bargi and run command :

sudo -s

and logged in as root and then execute my application ...is it should not picked setting from root home folder ????

but it is picking the settings from bargi home folder xml file ..........

I want to know when I logged in as root from terminal then why should it not accessing root home folder or I have to make

changes in coding ............. ?????

I have also run application using sudo ./App ........but the same result...... please explain me the reason.......


02-13-2008, 05:50 AM
No, when you do "sudo" you are only getting the privileges of root, not the identity of root - it's like you get an access pass into the oval office in the white-house, but you are not the president because of it.