lkml.org 
[lkml]   [2000]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: permissions not honoured by /bin/pwd aka getcwd
From
> Richard, I think the question is different. It is not root vs user.
>
> It is the behaviour of linux pwd. It does not go over the directory tree like
> solaris pwd and others. It reads '.' and prints it. F.e. sol reads and tries to
> resolve symlinks. And bummers.
>
> Try the following:
>
> mkdir -p /tmp/crap/crap1 ; ln -s /tmp/crap /tmp/crap2 ; cd /tmp/crap2/crap1 ;
> pwd

Hi,

I think that you are using bash's `internal' cwd and not running /bin/pwd:
Here is the output of running you commands on bash over linux and then
bash over solaris 6:

linux:/tmp/crap2/crap1$ uname -a
Linux school 2.2.14 #2 SMP Thu Feb 17 23:43:36 EST 2000 i686 unknown
linux:~$ mkdir -p /tmp/crap/crap1 ; ln -s /tmp/crap /tmp/crap2 ; cd /tmp/crap2/crap1 ;
linux:/tmp/crap2/crap1$ pwd
/tmp/crap2/crap1
linux:/tmp/crap2/crap1$ /bin/pwd
/tmp/crap/crap1
linux:/tmp/crap2/crap1$

solaris:/tmp/crap2/crap1# uname -a
SunOS sun00854 5.6 Generic_105181-11 sun4u sparc
solaris:~# mkdir -p /tmp/crap/crap1 ; ln -s /tmp/crap /tmp/crap2 ; cd /tmp/crap2/crap1 ;
solaris:/tmp/crap2/crap1# pwd
/tmp/crap2/crap1
solaris:/tmp/crap2/crap1# /bin/pwd
/tmp/crap/crap1
solaris:/tmp/crap2/crap1#

>
> on linux it returns /tmp/crap2/crap1
> on solaris it returns /tmp/crap/crap1
>
> If permissions on crap are 000 solaris bummersm, linux does not. This is on
> debian-potato and sol 2.6 respectively.
>
> And this is gnu fileutils not linux as such.
>
> In btw1: at least in some slackware (2.?) long ago pwd was working properly if
> sol's behaviour is considered proper.

--
----------------------------------------------------------------------------
Neal Walfield neal@walfield.org
UMass Lowell - Fox 1512 Phone: 978-934-5347
Fax: 603-415-3645
Love is the triumph of imagination over intelligence.
-- H. L. Mencken

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.059 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site