Results 1 to 8 of 8

Thread: Dodgy shell script keeps trying to run out of /tmp directory?

  1. #1

    Default Dodgy shell script keeps trying to run out of /tmp directory?

    This actually started happening on opensuse 13.2, I have just upgraded to tumbleweed and it's still doing it.

    Two separate files have requested root privileges to run so far.

    I always log in as a standard user, so I'm getting prompts to run them as root.

    I don't know if they are malicious, or if it's just my ignorance about file permission change commands.

    Anyway here is the script they keep trying to run:

    Code:
    #!/bin/bash
    chown -h -R 1000 "/home/aries/Dropbox"
    chmod  -R u+rw "/home/aries/Dropbox"
    echo Done
    "In the future, everything will work."

    Schwa

  2. #2

    Default Re: Dodgy shell script keeps trying to run out of /tmp directory?

    I should add that my dropbox is refusing to sync, giving a file permission error, so maybe I do need to run this script after all?
    "In the future, everything will work."

    Schwa

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,767
    Blog Entries
    3

    Default Re: Dodgy shell script keeps trying to run out of /tmp directory?

    I've never setup dropbox, so I might be making wrong guesses.

    If your UID is 1000, then those scripts should work. You should already own those files, so "chown" and "chmod" should not require root permissions. If your UID is not 1000, then I would guess that you are trying to access a different user's dropbox.

    In short, I'm not seeing anything particularly dodgy. Rather, you seem to be doing something odd.

    Hmm, I've seen some live media which setup the first user as UID=1001. I seem to recall that the "krypton" live install did that. So if the install setup the first user as UID=1001, but you are using an existing "/home" partition with a different UID, then you have to fix the UIDs.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  4. #4

    Default Re: Dodgy shell script keeps trying to run out of /tmp directory?



    On 04/05/2016 07:16 AM, Wild Goose wrote:
    >
    > This actually started happening on opensuse 13.2, I have just upgraded
    > to tumbleweed and it's still doing it.
    >
    > Two separate files have requested root privileges to run so far.
    >
    > I always log in as a standard user, so I'm getting prompts to run them
    > as root.
    >
    > I don't know if they are malicious, or if it's just my ignorance about
    > file permission change commands.


    Smart; good to look things up before answering source-less prompts for
    permissions.

    > Anyway here is the script they keep trying to run:
    >
    >
    > Code:
    > --------------------
    > #!/bin/bash
    > chown -h -R 1000 "/home/aries/Dropbox"


    Trying to set UID 1000 as the owner of 'Dropbox' but only if 'Dropbox' is
    a real thing (not a symlink, so probably a directory) and then do so
    recursively. This is probably fine, especially if your user's UID is 1000
    (run the 'id' command as your user in a shell to find out).

    > chmod -R u+rw "/home/aries/Dropbox"


    Recursively give the user-owner read/write rights on the Dropbox
    directory. Also probably fine.

    > echo Done


    Prints 'Done' to the screen followed by a newline.

    There is probably nothing wrong with any of this.

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...


  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,264

    Default Re: Dodgy shell script keeps trying to run out of /tmp directory?

    As an addition: when you show us what you are tryingto do (tyhe scrtipt), you do not show iuse what the owners/permissions were, nor what the output of the script is when running, nor what the resulting owner/permissions are.

    In short, no documentation of your problem at all.

    Code:
    ls -l /home/aries/Dropbox
    before and after, and
    Code:
    path/to/the/script
    in between.

    And one of those "prompt" you say you get would also not be out of place.

    We want to see computer facts and no conclusions.

    BTW. It seems that nrickert thinks that that file (maybe directory) Dropbox is not just a directory, but is something special to some application you use. Is thiis a mounted file system?
    Henk van Velden

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,761

    Default Re: Dodgy shell script keeps trying to run out of /tmp directory?

    By chance are you using MS file systems in this mix?

  7. #7

    Default Re: Dodgy shell script keeps trying to run out of /tmp directory?

    Sorry for not getting back sooner on this.

    Thank you everyone for your replies.

    Thanks also ab for your explanation. Based on that I entered the commands as root, and my Dropbox started syncing again!

    The tmp files no longer pop up to ask to run as root, so perhaps they were generated by the Dropbox programme.

    My uid was 1000, but I have upgraded this machine several times with successively newer versions of opensuse by wiping / but keeping the same /home partition and username.

    So maybe Dropbox got confused with taking over the /home partition with the newer installs.

    By the way, this machine does not have any MS partitions on it.
    "In the future, everything will work."

    Schwa

  8. #8
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,983
    Blog Entries
    14

    Default Re: Dodgy shell script keeps trying to run out of /tmp directory?

    Quote Originally Posted by Wild_Goose View Post
    Sorry for not getting back sooner on this.

    Thank you everyone for your replies.

    Thanks also ab for your explanation. Based on that I entered the commands as root, and my Dropbox started syncing again!

    The tmp files no longer pop up to ask to run as root, so perhaps they were generated by the Dropbox programme.

    My uid was 1000, but I have upgraded this machine several times with successively newer versions of opensuse by wiping / but keeping the same /home partition and username.

    So maybe Dropbox got confused with taking over the /home partition with the newer installs.

    By the way, this machine does not have any MS partitions on it.
    I think the script is there to make sure that even folders outside /home can be used to sync. If you don't own these folders the syncing ( which has you as the owner ) will not work. What bothers me is how you got a Dropbox folder not owned by your user. An upgrade/install using an old /home always makes sure the permissions are set correctly, so this must have happened some other way.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •