This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dcuddihy
Recipients dcuddihy
Date 2013-03-22.22:12:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363990327.07.0.260090776617.issue17525@psf.upfronthosting.co.za>
In-reply-to
Content
Calls to os.getcwd() can fail if issued from a cifs-mounted directory once any of the files or subdirectories have been changed remotely.  To recreate this: on Linux, mount a windows share using the mount.cifs command.  cd to the share and run python.   

Python 2.7.3 (default, Jul 24 2012, 10:05:38)
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license for more information.
>>> import os
>>> print os.getcwd()
 /home/user/share
>>> exit()

That works.  Now, on the host machine, change a file in the current directory and save it.  The unix 'pwd' still works.  But now:
>>> import os
>>> print os.getcwd()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory
>>>

Even though the unix 'pwd' and 'ls' commands still work, so I know my share is still accessible.

If I umount and then remount the share, the problem goes away until a file is changed remotely.

I'm running this on Fedora 17.
History
Date User Action Args
2013-03-22 22:12:07dcuddihysetrecipients: + dcuddihy
2013-03-22 22:12:07dcuddihysetmessageid: <1363990327.07.0.260090776617.issue17525@psf.upfronthosting.co.za>
2013-03-22 22:12:07dcuddihylinkissue17525 messages
2013-03-22 22:12:06dcuddihycreate