-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with autojump database, trying to recover from backup. #23
Comments
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. |
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". |
Seems like I closed this, but this issue is still open. |
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, ... |
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 -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 |
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? |
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. |
Thanks a lot for your help! |
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. |
Actually "su -" seems to work differently, and does not affect the permissions on the discussed file. |
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. |
Thanks! I use an alias from su to "su -" for my bash shell now so it works fine. |
I've just pushed a fix for this problem, can you tell me if you still have the problem with "su"? |
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". |
Huh, weird, I don't have the same problem. Did you unset the PROMPT_COMMAND (or reboot) since upgrading? |
"unset PROMPT_COMMAND" in .bashrc seemed to solve the problem. Everything works fine now. Thanks! |
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. |
It seems like this occurs everytime I want to use autojump after reboot:
j te
Problem with autojump database, trying to recover from backup...
Traceback (most recent call last):
File "/usr/bin/autojump", line 132, in
path_dict=open_dic(dic_file)
File "/usr/bin/autojump", line 117, in open_dic
shutil.copy(dic_file+".bak",dic_file)
File "/usr/lib/python2.6/shutil.py", line 88, in copy
copyfile(src, dst)
File "/usr/lib/python2.6/shutil.py", line 53, in copyfile
fdst = open(dst, 'wb')
IOError: [Errno 13] Permission denied: '/home/jostein/.local/share/autojump/autojump_py'
The output of "ls -l":
~/.local/share/autojump> ls -l
total 8
-rw------- 1 root root 1164 2010-10-22 18:13 autojump_py
-rw------- 1 jostein users 46 2010-10-21 19:28 autojump_py.bak
The text was updated successfully, but these errors were encountered: