AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
Expand all | Collapse all

Files do not display in SSH session to AIX....

  • 1.  Files do not display in SSH session to AIX....

    Posted Tue March 23, 2010 05:03 PM

    Originally posted by: SMHoblit


    I login to a remote AIX system via SSH (also tried Telnet) and I try to view log files from a specific directory, but I cannot view them, it says "cat: 0652-050 Cannot open filename".

    Also, if I do a standard "ls" command, the files aren't displayed. But, if I list only the specified files "ls filenameprefix*", I can see the files.

    The weird part is that all my co-workers can see the files and view them and we are all using the root login, but I can't. I was able to view the files last week, but tried yesterday and hit this error. I can view other files that appear via the "ls" command.

    It is essential that I can view these files in order to do my job.

    Can anyone help me with this problem?

    Thank you in advance.
    #AIX-Forum


  • 2.  Re: Files do not display in SSH session to AIX....

    Posted Tue March 23, 2010 06:13 PM

    Originally posted by: SystemAdmin


    Hi SMHobit,

    As the error suggests, I suspect it is a file access issue. What are the permissions on the files in question?

    Paul
    #AIX-Forum


  • 3.  Re: Files do not display in SSH session to AIX....

    Posted Tue March 23, 2010 06:15 PM

    Originally posted by: SMHoblit


    They all have read and write permissions for the root user.

    All my co-workers can view them just fine and they are also logging in as root.
    #AIX-Forum


  • 4.  Re: Files do not display in SSH session to AIX....

    Posted Wed March 24, 2010 12:09 AM

    Originally posted by: SystemAdmin


    I once had some strange things happen with the ls command in chrooted FTP, but never in ssh.

    Suggestions to try:
    ls -ld parent_directory
    aclget parent_directory
    whereis ls

    Could it be that you are using a different version of 'ls' than the other users, e.g. due to your PATH or an alias?
    #AIX-Forum


  • 5.  Re: Files do not display in SSH session to AIX....

    Posted Wed March 24, 2010 01:10 PM

    Originally posted by: SMHoblit


    Thank you for your reply!

    I did all your suggestions, I have to rename the directories and machine names for confidential reasons, but here they are:
    root@systemdirectory ls -ld parent_dir
    drwxrwxrwt 147 root system 73728 Mar 24 16:36 parent_dir
    root@systemdirectory aclget parent_dir
    *
    • ACL_type AIXC
    *
    attributes: SVTX
    base permissions
    owner(root): rwx
    group(system): rwx
    others: rwx
    extended permissions
    disabled
    root@systemdirectory whereis ls
    ls: /usr/bin/ls
    All my co-workers can see these files and view them under the root user. All we can think is that it's a problem with my environment. I've tried SSH through the SSH Secure Shell and PuTTY and I've also tried Telnetting from PuTTY and a Windows command line and I get the same results every time.

    Last week I was able to view these files just fine. They are log files and it is required that I look at them in order to do my job. At this point I am stuck. Something in my environment must have changed. Since last week I've had to do two manual Windows updates, one for Office and one for IE. However, a co-worker applied these updates and he can still view the files, so we've ruled that out.

    If anyone can help further, I would greatly appreciate it!
    #AIX-Forum


  • 6.  Re: Files do not display in SSH session to AIX....

    Posted Wed March 24, 2010 02:54 PM
      |   view attached

    Originally posted by: shargus


    You say you try telnetting and ssh'ing in - I assume you are getting in as a non-root user?

    Are the files located in a mounted filesystem, such as /mnt?

    If so, it could be the permissions of the underlying directory the filesystem was mounted on. Try running the commands in the attached document and see if that fixes the problem.
    #AIX-Forum

    Attachment(s)



  • 7.  Re: Files do not display in SSH session to AIX....

    Posted Wed March 24, 2010 03:20 PM

    Originally posted by: SMHoblit


    I'm logging in as root. So are all my co-workers.
    It is not a mount directory. It's a standard log file directory for our software.
    #AIX-Forum


  • 8.  Re: Files do not display in SSH session to AIX....

    Posted Wed March 24, 2010 06:26 PM

    Originally posted by: shargus


    Ok, I think I'm missing something here...

    They log in as root - they can see the files.

    You log in as root, to the same server - you cannot see the files?
    #AIX-Forum


  • 9.  Re: Files do not display in SSH session to AIX....

    Posted Wed March 24, 2010 06:33 PM

    Originally posted by: SMHoblit


    That is correct!

    My co-workers and I don't understand what the problem is. It's nuts!

    It's got to be something with my environment, but I don't know what it could be that would cause this type of behavior.

    I'm on a Windows XP system running SSH Secure Shell and I also have PuTTY.
    #AIX-Forum


  • 10.  Re: Files do not display in SSH session to AIX....

    Posted Thu March 25, 2010 01:29 AM

    Originally posted by: SystemAdmin


    Hi SM,

    Fascinating; unless it happens to you.

    A few questions:
    1. Login as yourself; can you see the files?

    2. Login as self, su root, can you see the files?

    3. Login as self, su - root, can you see the files?

    I am trying to see if the problem is your login or root's.

    With a root connection that does not see the files, run
    
    .  /etc/profile
    

    and see if that fixes things.

    You could also try running other peoples .profiles as root to see the effect.

    Finally, fsck the filesystem. It could be cactus.
    #AIX-Forum


  • 11.  Re: Files do not display in SSH session to AIX....

    Posted Thu March 25, 2010 03:00 PM

    Originally posted by: SMHoblit


    I just tried viewing the logs again and now they magically all show up again and I can view them!

    I've been having this problem the last three days and now it seems to be fixed! Hopefully it won't happen again.

    Also, I did not change any settings, perform any updates or reboot my computer, it just seems to be fixed now.

    Thank you all for your help! This problem was very perplexing for me and my co-workers.
    #AIX-Forum


  • 12.  Re: Files do not display in SSH session to AIX....

    Posted Sat March 27, 2010 12:50 AM

    Originally posted by: esv


    sounds like a terminal emulation problem/issue, or were you using any kind of graphics software in your desktop that could have modified the color palette, also, though a bit unlikely, could have anyone had setup control chars to modify your font color same as background? this could have been set for a particular pts/x or ip address ..
    btw... I'd stop using root directly, setup accounts for each individual and configure sudo to access root's shell/commands.

    best regards,
    esv.
    #AIX-Forum