Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Rakushun

Re: Directory inaccessible if parent directory is inaccessible

martin wrote:

Try turning off Clear aliases:
https://winscp.net/eng/docs/ui_login_scp


Yep, that seems to work :-)

Thnx,

Michael
Rakushun

Re: Directory inaccessible if parent directory is inaccessible

Ok, some deeper analysis:

Here the shell output if I connect to a linux machine:

linuxserver: /home/user/thisisme[248]>cd /home/user/myboss/ourcommonpaper
linuxserver: /home/user/myboss/ourcommonpaper[249]>pwd
/home/user/myboss/ourcommonpaper
linuxserver: /home/user/myboss/ourcommonpaper[250]>unalias pwd
linuxserver: /home/user/myboss/ourcommonpaper[251]>pwd
/home/user/ture/tex
linuxserver: /home/user/myboss/ourcommonpaper[252]>

And here a bit of shell output if I connect to the sun machine:

server: /home/user/thisisme[256]>cd /home/user/myboss/ourcommonpaper
server: /home/user/myboss/ourcommonpaper[257]>pwd
/home/user/myboss/ourcommonpaper
server: /home/user/myboss/ourcommonpaper[258]>alias
...
pwd echo $cwd
...
server: /home/user/myboss/ourcommonpaper[259]>unalias pwd
server: /home/user/myboss/ourcommonpaper[260]>pwd
pwd: cannot open directory `..': Permission denied
server: /home/user/myboss/ourcommonpaper[261]>

Regards,

Michael
Rakushun

Re: Directory inaccessible if parent directory is inaccessible

Another thing to note:

The machine I connect to is not a Linux machine. It is a SunOS 5.10 machine.
If I connect to a Linux machine which has also access to the same home directories, it seems to work.

Regards,

Michael
Rakushun

Re: Directory inaccessible if parent directory is inaccessible

Rakushun wrote:

Hello Martin,
Another thing I just recognised: The problem only appears if I use the SCP protocol to connect to the server. If I connect via SFTP, there is no problem entering "/home/user/myboss/ourcommonpaper" and viewing the content.


However, if I use Putty, I get an error using the following commands:

server: /home/user/thisisme[213]>cd /home/user/myboss/ourcommonpaper
server: /home/user/myboss/ourcommonpaper[214]>pwd ..
pwd: ignoring non-option arguments
pwd: cannot open directory `..': Permission denied
server: /home/user/myboss/ourcommonpaper[215]>

Regards,

Michael
Rakushun

Re: Directory inaccessible if parent directory is inaccessible

Hello Martin,

martin wrote:

WinSCP needs to use pwd command to determine the current working directory. But with your serup the pwd command does not work. Actually I was not able to reproduce your setup. What group owns the myboss? Are you member of that group?


myboss and me, we are both in the same group. If I use a standard Putty session, there is also no problem entering "pwd" in "/home/user/myboss" or "/home/user/myboss/ourcommonpaper", it works quite well.

Another thing I just recognised: The problem only appears if I use the SCP protocol to connect to the server. If I connect via SFTP, there is no problem entering "/home/user/myboss/ourcommonpaper" and viewing the content.

Regards,

Michael
martin

Re: Directory inaccessible if parent directory is inaccessible

WinSCP needs to use pwd command to determine the current working directory. But with your serup the pwd command does not work. Actually I was not able to reproduce your setup. What group owns the myboss? Are you member of that group?
martin

Re: Directory inaccessible if parent directory is inaccessible

Please attach a full log file showing the problem.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
Rakushun

Directory inaccessible if parent directory is inaccessible

Dear WinSCP team,

there seems to be a problem in WinSCP concerning entering directories. This is a rather old bug, I have always had it in all the WinSCP versions (up to and including 5.1.1), but now I want to pass it to you in hope it is fixed.

In our university, we have the situation that some parent directories are inaccessible while the subdirectories can be accessed. So everybody, who looks into the home directory of a user (e.g. /home/user/myboss) is not able to read the directory. However, if you 'know' the path (e.g., /home/user/myboss/ourcommonpaper), I can enter the directory with a "cd" command using putty, list the directory with "ls" and copy the data to my home directory using "cp". However, I cannot enter the directory with WinSCP. If I enter a path like "/home/user/myboss/ourcommonpaper" in the address bar on top of WinSCP, I get the error message

---
Command 'pwd'
failed with return code 1 and error message
pwd: cannot open directory `..': Permission denied.
---

It seems that WinSCP requires the parent directory to be accessible to access subdirectories, which is not the case here. This is a rather annoying situation as it requires me to copy all the data to my home directory before I can copy it to my Windows machine with WinSCP. The parent directory "/home/user/myboss" has permissions "0710", the subdirectory "/home/user/myboss/ourcommonpaper" and all its subfolders "0755".

Can you help?

Regards,

Michael


P.S.: The connection options are:

Remote system = SunOS jerusalem 5.10 Generic_138888-03 sun4u sparc SUNW,Sun-Fire-V440 Solaris
Session protocol = SSH-2
SSH implementation = OpenSSH_4.6
Encryption algorithm = aes
Compression = ZLib
File transfer protocol = SCP
------------------------------------------------------------
Server host key fingerprint
ssh-rsa 2048 1f:ed:e6:f9:ad:4b:49:17:87:e7:e6:b4:ce:e5:dc:d9
------------------------------------------------------------
Can change permissions = Yes
Can change owner/group = Yes
Can execute arbitrary command = Yes
Can create symlink/hardlink = Yes/Yes
Can lookup user groups = Yes
Can duplicate remote files = Yes
Can check available space = No
Can calculate file checksum = No
Native text (ASCII) mode transfers = No