Skip to content
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

fix permission problem for Ubuntu 16.04 WSL #28

Closed
wants to merge 1 commit into from

Conversation

mdik
Copy link

@mdik mdik commented Jul 2, 2018

I fixed it manually at each participants computer this setup round, so didn't test this, but then it isn't a very complex change ¯\_(ツ)_/¯

@ssaunier
Copy link
Member

ssaunier commented Jul 2, 2018

Thanks @mdik for this PR. @juliends can you have a look before next monday? 🙏

@juliends
Copy link
Contributor

juliends commented Jul 2, 2018

@ssaunier @mdik I will check this tomorrow.
Thanks for reporting 🙏

@krokrob
Copy link
Member

krokrob commented Jul 4, 2018

Hello @mdik, I just try to run your fix with no success on the zsh-syntax-highlighting warning. Can you precise what this line is supposed to do?
FYI my log:

[oh-my-zsh] Insecure completion-dependent directories detected:                                                                                                       drwxrwxrwx 0 lewagon lewagon 4096 Jul  4 14:04 /home/lewagon/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting                                                                                                                                                                                                                              [oh-my-zsh] For safety, we will not load completions from these directories until                                                                                    
[oh-my-zsh] you fix their permissions and ownership and restart zsh.                                                                                                  
[oh-my-zsh] See the above list for directories with group or other writability.                                                                                                                                                                                                                                                             [oh-my-zsh] To fix your permissions you can do so by disabling                                                                                                        
[oh-my-zsh] the write permission of "group" and "others" and making sure that the                                                                                     
[oh-my-zsh] owner of these directories is either root or your current user.                                                                                           
[oh-my-zsh] The following command may help:                                                                                                                           
[oh-my-zsh]     compaudit | xargs chmod g-w,o-w                                                                                                                                                                                                                                                                                             [oh-my-zsh] If the above didn't help or you want to skip the verification of                                                                                          
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to                                                                                      [oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.

@mdik
Copy link
Author

mdik commented Jul 4, 2018

The problem is that zsh, or oh-my-zsh, has strict expectations about the permissions set for some files and/or directories, usually so that private information (like secret keys or passwords) are only readable by the user's account, and not other system users (e.g. the webserver).

chmod 0770 path/to/directory removes access-, read-, and write-permissions for any system user, except the owning user and group of the directory (or file).

If this proposed fix doesn't work, maybe the culprit lies in how things are symlinked, and it needs to be executed at a later point as

chmod 0770 ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

?

I'm not really sure, unfortunately, but this last line worked for all the students cases of this problem.

@krokrob
Copy link
Member

krokrob commented Jul 10, 2018

the command works after installing dotfiles, I'd rather put this inside WSL setup

@mdik
Copy link
Author

mdik commented Jul 19, 2018

Ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants