"Cannot detemine working directory" - SGI

This is a discussion on "Cannot detemine working directory" - SGI ; So this is an odd one. I lost a system drive and installed another, made it a rootdrive, booted into miniroot from the CD and used xfsrestore to restore root. Okay this all went rather uneventfully. I was able to ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: "Cannot detemine working directory"

  1. "Cannot detemine working directory"

    So this is an odd one. I lost a system drive and installed
    another, made it a rootdrive, booted into miniroot from
    the CD and used xfsrestore to restore root. Okay this
    all went rather uneventfully. I was able to reboot and
    observe the data in / as before with one major expcetion. Users
    trying to use csh are gettinh a "no SHELL" error.

    So sh users are okay (statically linked) and I noticed problems
    with some of the perms on /lib - it was like drwx----- ! (well
    minus the exclamation of course). Very odd. I changed the
    perms on to relfect that of an existing installation
    that I also have running. The problem changed to

    UX:csh: SV=0: Cannot determine current working directory

    I thought xfsretore
    would dutifully restore the perms along with the data. So a
    par of something like this looks like that supplied below
    but the interesting line is

    open("../../..", O_RDONLY|O_NONBLOCK, 017777607020) errno = 13 (Permission denied)

    But this does't make sense since thats / (so su - kim would put you
    into /sw6/people/kim so ../../.. is /)

    and the perms are
    drwxr-xr-x 51 root sys 4096 Jan 14 18:23 /

    Here is most of the output. Note that root users and sh users aren't
    impacted (sh is statically linked)


    # par -sSS su - kim
    ...
    ...
    ...
    setuid(1111) OK
    syssgi(SGI_PROC_ATTR_SET, 0xfb2af88, 0x10019d48, 0x18, 0, 0) = 0
    chdir("/sw6/people/kim") OK
    open("/sw6/people/kim/.lang", O_RDONLY, 02000) errno = 2 (No such file or directory)
    time() = 1074123506
    open("/dev/log", O_WRONLY, 0) = 5
    fcntl(5, F_SETFD, 1) OK
    time() = 1074123506
    getpid() = 4403, ppid=4405
    putmsg(5, 0x7fff2be8, 0x7fff2bf8, 0) = 0
    close(5) OK
    fstat(4, 0x7fff2150) OK
    brk(0x10028000) OK
    ioctl(4, __OLD_TCGETA, 0x7fff20f0) errno = 25 (Inappropriate I/O control operation)
    write(4, "SU 01/14 18
    END-write() = 32
    close(4) OK
    syssgi(SGI_PROC_ATTR_GET, 0xfb2af88, 0x10019d68, 0, 0x8, 0x100210d0) = 0
    syssgi(SGI_PROC_ATTR_SET, 0xfb2af88, 0x10019d48, 0x18, 0xffffffff, 0) = 0
    syssgi(SGI_PROC_ATTR_SET, 0xfb2af88, 0x10019d28, 0x18, 0, 0) = 0
    execve("/bin/csh", 0x7fff2f6c, 0x100185e0)
    END-execve() OK
    sysconf(_SC_ARG_MAX) = 20480
    getpagesize() = 16384
    brk(0xe09c000) OK
    gettimeofday({sec=1074123506, usec=882533}) OK
    ...
    ...
    stat(".", 0x7fff0e10) OK
    open("..", O_RDONLY|O_NONBLOCK, 017777607020) = 0
    fcntl(0, F_SETFD, 1) OK
    fstat(0, 0x7fff0550) OK
    fstat(0, 0x7fff0e10) OK
    ngetdents(0, 0xe0968e8, 16384, 0x7fff05e0) = 216
    close(0) OK
    open("../..", O_RDONLY|O_NONBLOCK, 017777607020) = 0
    fcntl(0, F_SETFD, 1) OK
    fstat(0, 0x7fff0550) OK
    fstat(0, 0x7fff0e10) OK
    ngetdents(0, 0xe0968e8, 16384, 0x7fff05e0) = 872
    close(0) OK
    open("../../..", O_RDONLY|O_NONBLOCK, 017777607020) errno = 13 (Permission denied)



    I'm not sure how munged up this all is or whether I should
    bag and reinstall from scratch.

    Thanks



    --
    Steve Pittard | http://catalina.bimcore.emory.edu (HOME PAGE)
    Emory University | wsp@emory.edu, wsp@bimcore.emory.edu (INTERNET)
    BIMCORE Support | 404 727 0038

  2. Re: "Cannot detemine working directory"

    In article ,
    Steve Pittard wrote:
    : open("../../..", O_RDONLY|O_NONBLOCK, 017777607020) errno = 13 (Permission denied)

    :But this does't make sense since thats / (so su - kim would put you
    :into /sw6/people/kim so ../../.. is /)

    My first guess would be that /sw6 is a mount point for a filesystem
    and that what you need to do is umount the filesystem and
    modify the permissions of the underlying /sw6 directory and then
    remount . The permissions used for a path component which is
    a mount point is the permission of the underlying directory, not the
    permission of the root of the mounted filesystem.
    --
    Will you ask your master if he wants to join my court at Camelot?!

  3. Re: "Cannot detemine working directory"

    So Walt got it right. I unmounted the filesystem and saw that the
    perms on /disk6 were 700. I changed them to 755 , remounted, and
    all was as before. Of course I did the xfsretore from miniroot
    which might in fact have impacted the problem or at least seems
    to have contributed to it.

    Walter Roberson wrote:
    : In article ,
    : Steve Pittard wrote:
    : : open("../../..", O_RDONLY|O_NONBLOCK, 017777607020) errno = 13 (Permission denied)

    : :But this does't make sense since thats / (so su - kim would put you
    : :into /sw6/people/kim so ../../.. is /)

    : My first guess would be that /sw6 is a mount point for a filesystem
    : and that what you need to do is umount the filesystem and
    : modify the permissions of the underlying /sw6 directory and then
    : remount . The permissions used for a path component which is
    : a mount point is the permission of the underlying directory, not the
    : permission of the root of the mounted filesystem.

    --
    Steve Pittard | http://catalina.bimcore.emory.edu (HOME PAGE)
    Emory University | wsp@emory.edu, wsp@bimcore.emory.edu (INTERNET)
    BIMCORE Support | 404 727 0038

+ Reply to Thread