Bug 9283 - getcwd: cannot access parent with cifs
getcwd: cannot access parent with cifs
Status: NEW
Product: CifsVFS
Classification: Unclassified
Component: kernel fs
2.6
All Linux
: P5 normal
: ---
Assigned To: Steve French
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-11 05:16 UTC by yzg
Modified: 2013-02-20 04:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yzg 2012-10-11 05:16:24 UTC
The cifs share is hosted on Win2000 computer and mounted on a Gentoo Linux computer with options "users,exec". The version of Samba is 3.6.8.

Steps to trigger the error:  

(1) Create a directory into a samba share
$ cd /mnt/samba_share
$ mkdir tmp1

(2) Then create a sub-directory
$ cd tmp1
$ mkdir tmp2
$ cd tmp2

(3) Running command like make will not generate the error. 
$ make
make: *** No targets specified and no makefile found.  Stop.

(4) Now create a file in the parent directory and delete it.
$ touch ../any.txt
$ rm ../any.txt 

(5) Running make again will give "getcwd: No such file or directory" error.
$ make
make: getcwd: No such file or directory
make: *** No targets specified and no makefile found.  Stop.

(6) Changing directory to the parent directory and back again will stop the error.
$ cd ../tmp2
$ make
make: *** No targets specified and no makefile found.  Stop.

(7) It is not only Other commands like gentoo equery command generates the same error
$ equery b /usr/bin/find
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
 * Searching for /usr/bin/find ...
Comment 1 yzg 2012-10-14 23:31:42 UTC
Update:

I saw the same error with ext3 while building Asterisk package. So it is not limited to cifs.
Comment 2 Marcus Moeller 2012-12-10 09:27:21 UTC
We've only experienced that with CIFS.
Comment 3 Björn Baumbach 2012-12-13 15:01:17 UTC
I can not reproduce this on my Gentoo Linux 3.5.7 on a Samba 4.0.0 share mounted with cifs-utils-5.5-r1.

yzg: the samba version does not matter. The cifs stuff depends on the Kernel and cifs-utils. Do you still have this problem?
Comment 4 Volker Lendecke 2012-12-13 16:29:36 UTC
Is it possible that you removed your own subdirectory instead of just one file in the parent directory?

vlendec@delphin:~$ mkdir /tmp/bla
vlendec@delphin:~$ mkdir /tmp/bla/blub
vlendec@delphin:~$ cd /tmp/bla/blub
vlendec@delphin:/tmp/bla/blub$ rm -r /tmp/bla
vlendec@delphin:/tmp/bla/blub$ ls
vlendec@delphin:/tmp/bla/blub$ cd ..
cd: Kann das nicht aktuelle Verzeichnis wiederfinden: getwd: Kann nicht auf das übergeordnete Verzeichnis zugreifen.: Datei oder Verzeichnis nicht gefunden
vlendec@delphin:/tmp/bla/blub/..$
Comment 5 yzg 2013-02-20 04:41:52 UTC
Hi Björn

Yes, I still have this problem. I'm at version net-fs/cifs-utils-5.6-r1 and kernel 3.6.11-gentoo.

Sometimes, it does not reproduce. But if you delete all the directories and repeat the procedure, it happens.

The problem is interfering with any build process if the project files are stored on samba. 

Hi Volker

I'm very careful about deleting the current directory.