Giter Club home page Giter Club logo

Comments (17)

joelthelion avatar joelthelion commented on May 20, 2024

Hi jostein,

Do you have the latest version? I used to have a similar problem, but I thought I have fixed it in a recent commit.

from autojump.

jostber avatar jostber commented on May 20, 2024

I tried the latest git version today, but the same error occurs. If I try to reset the the permissions manually to "jostein, users" it is immediately reset to "root, root".

from autojump.

jostber avatar jostber commented on May 20, 2024

Seems like I closed this, but this issue is still open.

from autojump.

joelthelion avatar joelthelion commented on May 20, 2024

Hi!

I'm sorry this is still an issue for you. I'll try to investigate, but it will be a bit difficult since I haven't had the problem myself for a while.

In the meantime, could you send me all the information that seems relevant to you? Examples: content of the $PROMPT_COMMAND variable, permissions and ownership on the folder and all the files in ~/.local/share/autojump, content of autojump_errors, shell you're using, ...

from autojump.

jostber avatar jostber commented on May 20, 2024

Here it is:

A. Output of $PROMPT_COMMAND

: ; { (autojump -a "$(pwd -P)"&)>/dev/null 2>>${AUTOJUMP_DATA_DIR}/.autojump_errors;} 2>/dev/null

B. Permisssions and ownership folder

drwxr-xr-x 2 jostein users 4096 2010-10-27 06:06 autojump

C. Files in autojump folder

~/.local/share/autojump> ls -l
total 8
-rw------- 1 root root 1445 2010-10-27 06:06 autojump_py

-rw------- 1 jostein users 1190 2010-10-27 05:05 autojump_py.bak

D. Content of autojump errors

This is always the same as I posted in my first post. Autojump worked fine for a while, and then I started getting this error.

E. echo $SHELL
/bin/bash

from autojump.

joelthelion avatar joelthelion commented on May 20, 2024

Some more questions: do you often work as root? What do you use? su? sudo? Do you remember what you were doing (especially as root) when the problem appeared?

from autojump.

jostber avatar jostber commented on May 20, 2024

I work as root only when needed to do system configs. I have now downloaded the latest git version, removed the ~/.local/share/autojump directory and reinstalled autojump. The permissions for the directory seems right now. I will check what happens again after reboot.

from autojump.

joelthelion avatar joelthelion commented on May 20, 2024

Thanks a lot for your help!

from autojump.

jostber avatar jostber commented on May 20, 2024

It seems like the file ~/.local/share/autojump_py gets its permissions changed to "root, root" as soon as I log in as root with su. After that the error start occuring. I have also tried "su -m" and "su -", but that seemed not to make any difference.

For some reason root seems to affect the autojump_py file and changes its permissions just by logging in to the root user.

from autojump.

jostber avatar jostber commented on May 20, 2024

Actually "su -" seems to work differently, and does not affect the permissions on the discussed file.

from autojump.

joelthelion avatar joelthelion commented on May 20, 2024

Great news: thanks to your explanations, I've finally been able to reproduce the problem. I'll try to work on a fix this week end.

from autojump.

jostber avatar jostber commented on May 20, 2024

Thanks! I use an alias from su to "su -" for my bash shell now so it works fine.

from autojump.

joelthelion avatar joelthelion commented on May 20, 2024

I've just pushed a fix for this problem, can you tell me if you still have the problem with "su"?

from autojump.

jostber avatar jostber commented on May 20, 2024

Autojump works correctly with "su" now if I don't cd outside the home directory when root. If I f.ex. cd to the root directory the same error occurs after "su username".

from autojump.

joelthelion avatar joelthelion commented on May 20, 2024

Huh, weird, I don't have the same problem.

Did you unset the PROMPT_COMMAND (or reboot) since upgrading?

from autojump.

jostber avatar jostber commented on May 20, 2024

"unset PROMPT_COMMAND" in .bashrc seemed to solve the problem. Everything works fine now. Thanks!

from autojump.

joelthelion avatar joelthelion commented on May 20, 2024

Great to know it works for you!

Just note that you shouldn't need to unset the prompt command in your bashrc, it should only be needed once when upgrading.

from autojump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.