2

I used Git Bash to create a Unix-like environment to do some work, but it seems to fail when I tried to change the permissions of a file.

Here's a sample run:

$ chmod u+x blastp

$ ls -al blastp
-rw-r--r-- 1 wangshx 197121 42138032 十月 19 08:27 blastp

$ chmod 777 blastp

$ ls -al blastp
-rw-r--r-- 1 wangshx 197121 42138032 十月 19 08:27 blastp

Another tool I cloned from GitHub by Git Bash works just fine.

So is the problem caused by the software blast itself?

Azeem
  • 11,148
  • 4
  • 27
  • 40
Shixiang Wang
  • 2,147
  • 2
  • 24
  • 33
  • Did you try to run Git Bash as admin and then change the file permissions? – Azeem Mar 21 '18 at 08:43
  • @Azeem None. I will try it. – Shixiang Wang Mar 21 '18 at 11:44
  • @Azeem use admin cannot fix this problem. – Shixiang Wang Mar 21 '18 at 11:53
  • Right. Is this file currently in use? Make sure it isn't by take a look at Windows Task Manager. End process if it is running. Windows always has such issues of file locking. You can also check if the return code of last command is success i.e. `$ echo $?`. – Azeem Mar 21 '18 at 12:15
  • I tested it myself. You are right. There's no effect at all. All the files have the permissions that you posted in your questions. There's no change at all using `chmod` command. – Azeem Mar 21 '18 at 12:22
  • 1
    I guess these things will start to have effect once you have `cygwin` installed on your machine. Because, `Git Bash` is just a terminal with *nix commands to to provide a *nix Terminal experience. You might want to check that out, just to be sure. – Azeem Mar 21 '18 at 12:23
  • It might be related to the execute bit. https://stackoverflow.com/questions/25730041/updating-file-permissions-with-git-bash-on-windows-7#25730108 – Jacob Vanus Mar 21 '18 at 16:46
  • Thank all of you, I just gave up and use blastp in linux enviroment. – Shixiang Wang Mar 22 '18 at 12:33

0 Answers0