Cygwin mkdir makes directory I don't have permissions to

خرید بک لینک

Using latest version of cygwin64 in Windows 10. I have managed to get a directory foo that has something strange about its permissions. I'm not quite sure how this happened but here are the symptoms:

$ cd /f/temp/foo
$ ls -lad .
drwxrwx---+ 1 Mm None 0 Jun 16 14:03 .
$ mkdir bar
$ ls -lad bar
d---rwx---+ 1 Mm None 0 Jun 16 14:17 .
$ cd bar
Permission denied
$ umask
0022

This doesn't happen for other directories, e.g. /f/temp/ok. Using ls switches I cannot see any difference between f/temp/ok and /f/temp/foo.

If I do chmod 775 bar then I can enter bar, but then making a directory under bar has the same problem. So this problem is stopping me doing git init in /f/temp/foo. Doing chown -R Mm * in the parent makes no difference.

My question is: What is causing this problem and what is the proper fix?

There are some differences visible with icacls but I'm not sure how to interpret them:

$ cd /f/temp
$ icacls ok  >ok.txt
$ icacls foo >foo.txt
$ diff -b ok.txt foo.txt
1c1
< ok NULL SID:(DENY)(Rc,S,REA,WEA,X,DC)
---
> foo NULL SID:(DENY)(Rc,S,REA,WEA,X,DC)
3c3
<   DESKTOP-AO2AIECNone:(RX)
---
>    DESKTOP-AO2AIECNone:(Rc,S,RA)
8c8
<   Everyone:(RX)
---
>    Everyone:(Rc,S,RA)
10,11c10,12
<   CREATOR OWNER:(OI)(CI)(IO)(F)
<   CREATOR GROUP:(OI)(CI)(IO)(RX)
---
>    CREATOR OWNER:(OI)(CI)(IO)(DENY)(S,RD,WD,AD,REA,WEA,X,DC)
>    CREATOR OWNER:(OI)(CI)(IO)(D,Rc,WDAC,WO,RA,WA)
>    CREATOR GROUP:(OI)(CI)(IO)(Rc,S,RA)
16c17
<   Everyone:(OI)(CI)(IO)(RX)
---
>    Everyone:(OI)(CI)(IO)(Rc,S,RA)

I have got a workaround for now: make another directory under /f/temp, then use cp -r to copy all the files out of foo into the new directory, then delete foo and rename the new directory. If I use cp -a instead of cp -r the problem persists.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 185 تاريخ: پنجشنبه 27 خرداد 1395 ساعت: 9:48

صفحه بندی