Thread: Problem in accessing root home folder....

  1. #1
    Registered User
    Join Date
    Jan 2007

    Problem in accessing root home folder....


    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 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.......


  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    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.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  2. Replies: 5
    Last Post: 12-03-2003, 05:47 PM
  3. why is the input not working
    By mackol in forum C Programming
    Replies: 7
    Last Post: 11-07-2002, 04:28 AM
  4. problem with output
    By Garfield in forum C Programming
    Replies: 2
    Last Post: 11-18-2001, 08:34 PM
  5. can anyone find the problem in my code
    By ArseMan in forum C++ Programming
    Replies: 2
    Last Post: 09-20-2001, 09:02 PM