Announcement

Collapse
No announcement yet.

is owned by uid 1000 instead of uid 0

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    is owned by uid 1000 instead of uid 0

    I know that this is an old topic that hasn't been discussed in about a year, but it is stumping me in this case.

    I have a perl script which recompiles a library in my home directory then copies it to /usr/local/<location>/<version>. Then I try to change ownership and permissions. That is what fails, giving this message.

    Here is what happpens when I run the script under sudo:

    bear@nomad:~/MCperl$ sudo ./apibuild -c -P 7A -v test1
    info>Building MC7A version test1 API library by developer bear >:apibuild[49]
    info>API directories cleaned >:apibuild[53]
    info>API Build Version test1 Successful. >:apibuild[62]
    info>libdfc.a copied to /usr/local/MC7Abin/test1/libdfc.a >:MClib.pm[109] >>:MClib.pm[107] >>>:apibuild[63]
    info>chown -f root:root /usr/local/MC7Abin/test1/libdfc.a failed >:MClib.pm[119] >>:apibuild[64]
    debug>PUNT >:MClib.pm[120] >>:apibuild[64] >:MClib.pm[196] >>:MClib.pm[120] >>>:apibuild[64]
    bear@nomad:~/MCperl$ Error: "/var/tmp/kdecache-bear" is owned by uid 1000 instead of uid 0.
    Error: "/tmp/kde-bear" is owned by uid 1000 instead of uid 0.
    Note that I can copy as root, but I can't chown or chmod (tried before).

    But then I thought I could really become root if I did "sudo konsole" and then run the script from the konsole window. This is what happened when I did that:

    root@nomad:~/MCperl# ./apibuild -c -P 7A -v test1
    info>Building MC7A version test1 API library by developer bear >:apibuild[49]
    info>API directories cleaned >:apibuild[53]
    info>API Build Version test1 Successful. >:apibuild[62]
    info>libdfc.a copied to /usr/local/MC7Abin/test1/libdfc.a >:MClib.pm[109] >>:MClib.pm[107] >>>:apibuild[63]
    info>chown -f root:root /usr/local/MC7Abin/test1/libdfc.a failed >:MClib.pm[119] >>:apibuild[64]
    debug>PUNT >:MClib.pm[120] >>:apibuild[64] >:MClib.pm[196] >>:MClib.pm[120] >>>:apibuild[64]
    root@nomad:~/MCperl# Error: "/var/tmp/kdecache-bear" is owned by uid 1000 instead of uid 0.
    Error: "/tmp/kde-bear" is owned by uid 1000 instead of uid 0.
    Note, I am now root in this case. But I still can chown, and get the same error.

    Does anybody know how to fix this?

    TIA

    Bear

    #2
    Re: is owned by uid 1000 instead of uid 0

    Originally posted by beartham
    I know that this is an old topic that hasn't been discussed in about a year, but it is stumping me in this case.

    I have a perl script which recompiles a library in my home directory then copies it to /usr/local/<location>/<version>. Then I try to change ownership and permissions. That is what fails, giving this message.

    Here is what happpens when I run the script under sudo:

    bear@nomad:~/MCperl$ sudo ./apibuild -c -P 7A -v test1
    info>Building MC7A version test1 API library by developer bear >:apibuild[49]
    info>API directories cleaned >:apibuild[53]
    info>API Build Version test1 Successful. >:apibuild[62]
    info>libdfc.a copied to /usr/local/MC7Abin/test1/libdfc.a >:MClib.pm[109] >>:MClib.pm[107] >>>:apibuild[63]
    info>chown -f root:root /usr/local/MC7Abin/test1/libdfc.a failed >:MClib.pm[119] >>:apibuild[64]
    debug>PUNT >:MClib.pm[120] >>:apibuild[64] >:MClib.pm[196] >>:MClib.pm[120] >>>:apibuild[64]
    bear@nomad:~/MCperl$ Error: "/var/tmp/kdecache-bear" is owned by uid 1000 instead of uid 0.
    Error: "/tmp/kde-bear" is owned by uid 1000 instead of uid 0.
    Note that I can copy as root, but I can't chown or chmod (tried before).

    But then I thought I could really become root if I did "sudo konsole" and then run the script from the konsole window. This is what happened when I did that:

    root@nomad:~/MCperl# ./apibuild -c -P 7A -v test1
    info>Building MC7A version test1 API library by developer bear >:apibuild[49]
    info>API directories cleaned >:apibuild[53]
    info>API Build Version test1 Successful. >:apibuild[62]
    info>libdfc.a copied to /usr/local/MC7Abin/test1/libdfc.a >:MClib.pm[109] >>:MClib.pm[107] >>>:apibuild[63]
    info>chown -f root:root /usr/local/MC7Abin/test1/libdfc.a failed >:MClib.pm[119] >>:apibuild[64]
    debug>PUNT >:MClib.pm[120] >>:apibuild[64] >:MClib.pm[196] >>:MClib.pm[120] >>>:apibuild[64]
    root@nomad:~/MCperl# Error: "/var/tmp/kdecache-bear" is owned by uid 1000 instead of uid 0.
    Error: "/tmp/kde-bear" is owned by uid 1000 instead of uid 0.
    Note, I am now root in this case. But I still can chown, and get the same error.

    Does anybody know how to fix this?

    TIA

    Bear
    [ignore]How are you chowning and chmodding from within Perl?

    Are you using a system, or `` call or are you using Perl's built in functions?

    Internal functions would probably work best.
    Code:
    chown 0,0, /var/tmp/kdecache-bear
    chmod 755, /var/tmp/kdecache-bear
    [/bear]
    [/ignore]

    OH, this is most likely due to the sticky bit on /tmp and /var/tmp.

    For more info:
    Originally posted by man chmod
    STICKY DIRECTORIES
    When the sticky bit is set on a directory, files in that directory may be unlinked or renamed only by root or their owner. Without the
    sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on directories, such as
    /tmp, that are world-writable.
    Don&#39;t blame me for being smarter than you, that&#39;s your parent&#39;s fault.

    Comment


      #3
      Re: is owned by uid 1000 instead of uid 0

      Originally posted by beartham
      But then I thought I could really become root if I did "sudo konsole" and then run the script from the konsole window.
      It might be a bad idea to invoke Konsole with sudo. There have been reported serious problems when using sudo to start GUI apps.
      Welcome newbies!
      Verify the ISO
      Kubuntu's documentation

      Comment


        #4
        Re: is owned by uid 1000 instead of uid 0

        Originally posted by Telengard
        There have been reported serious problems when using sudo to start GUI apps.
        Yep, that is true. I'm not enough of a Linux guru to understand the exact mechanics, but using "sudo" to start KDE apps, rather than "kdesudo" can change the permissions on ~.ICEauthority and ~.Xauthority to root, and once that happens, the user is locked out of subsequent KDE logins.

        Comment


          #5
          Re: is owned by uid 1000 instead of uid 0 [Worked around]

          I was able to work around the problem by using the internal Perl chown and chmod commands.

          Thanx

          beartham

          Comment


            #6
            Re: is owned by uid 1000 instead of uid 0

            Hi beartham, I wonder if you'd have some advice for me. I've had something a little bit like this on my system, but unfortunately I don't understand the solution or workaround you mention.

            I get the problem whenever I use sudo or kdesudo from Konsole, e.g. kdesudo kate. Invariably, I get a message that ranges from 4 lines to 50 lines containing statements like:
            Code:
            Error: "/tmp/kde-patrick" is owned by uid 1000 instead of uid 0.
            I seem to be lacking permissions or something, c.f.

            Code:
            [email]patrick@patrick-linux:~/.kde[/email]$ ls -ld ~/.kde
            drwx------ 6 patrick patrick 4096 2010-08-17 05:22 /home/patrick/.kde

            Comment


              #7
              Re: is owned by uid 1000 instead of uid 0

              Ptoche: As I mentioned in another post, this error message can safely be ignored. kubuntu simply does not use a root (uid=0) account as a lot of distros do. This error message really should probably be suppressed in the core code somehow (if possible), but it hasn't and has been around for years and years with no ill effect.

              If you are having read/write permission problems in your $HOME (you have not stated so as far a I can see), it probably stems from running a gui app with sudo from the command-line.

              You can fix this easily from the command-line:
              sudo chown -Rv username:username /home/username
              You will still see the uid message, however. That is unavoidable. Don't run non-system tools with sudo. Use the alt-f2 run dialog, or use kdesudo from the terminal

              Comment


                #8
                Re: is owned by uid 1000 instead of uid 0

                thanks claydoh, I get it now! yes I have fixed the permissions here and there with sudo chown and will learn to live with the uid error message thing (and others) I get, hey thanks for your patience.

                Comment

                Working...
                X