This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: login: no shell: /bin/bash: Permission denied


On Thu, Mar 07, 2002 at 02:04:38PM +0100, Jan Nieuwenhuizen wrote:
> Yes, Cygwin gives a lot more insight in permissions.  It seems
> however, that XP (HE) doesn't respect execute permissions on
> directories, in some cases.  Moreover, read and execute permissions in
> /cygdrive/c seem to be granted in any case.
> 
>     $ mkdir 400; echo 400 > 400/400; chmod 400 400
>     $ ls -ld 400 400/400; cat 400/400
>     dr--------    2 fred     Geen            0 Mar  7 12:52 400
>     -rw-rw-rw-    1 fred     Geen            4 Mar  7 12:52 400/400
>     $ cd 400
>     bash: cd: 400: Permission denied

I don't understand your example.  What's wrong?  Hmm, ok, I assume
you expect a `Permission denied' when trying to ls 400/400, right?
This is not HE specific, it's default for all NT versions.  It's
a user right called "Bypass traverse checking" which is by default
given to everyone!  It means, when accessing a file, the system
only checks your permissions on the file but not your permissions
on the directories in the file's path.  No chance to do that 100%
POSIX compliant since it's not in the responsibility of Cygwin to
change user rights.  And we decided not to simulate that behaviour.
Cygwin is already slow enough.

>     $ ls -l /cygdrive/c/autoexec.bak
>     -rwx------    1 tom      Geen           18 Mar  7 12:55 /cygdrive/c/autoexec.bak
>     $ cat /cygdrive/c/autoexec.bak
>     Path=C:\WINDOWS;
>     $ id
>     uid=1009(fred) gid=513(Geen) groups=0(Iedereen),513(Geen),545(Gebruikers)

Ok, check the *full* permissions using getfacl.  You'll be surprised,
probably...  Don't forget that an ACL contains more than just three
entries.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]