[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

shell-init: could not get current directory: getcwd: cannotaccess....

I have noticed that there are a great many enquiries concerning...

shell-init: could not get current directory: getcwd: cannot access parent
directories: No such file or directory

This can happen when mounting a disk onto a mount point that does not have
the correct underlying permissions set on it in the first place.
Especially likely if root has a default umask setting of 077

Thus if you have a mount point of /usr/people/Project_Work

drwx------    4 root     sys         34 May  7 05:03 Project_Work/

Then mount a disk partition/slice onto /usr/people/Project_Work and put
user accounts into Project_Work then the system will complain that it
cannot determin the current directory. Even if, with the disk mounted, you
change the permissions of the Project_Work folder.

What you must do is, without the disk mounted on the mount point. Create
the mount point then chmod 777 the mount point folder.

Now mount the disk onto the mount point.

This will clear the inability to access the current folder and errors such

Cannot access ./..: Permission denied

>From then on you can control the permissions as you wish.

Hope this helps :)

David J Barker                   | Tel    : +44 (0)1225 386927
Computer Systems Manager         | Fax    : +44 (0)1225 386928
Dept of Mechanical Engineering   |
Faculty of Engineering & Design  | Email  : D.J.Barker@bath.ac.uk
The University of Bath           | WWW    : http://staff.bath.ac.uk/ensdjb
Bath  Somerset  BA2 7AY  UK      |
      Mech Eng IT Support (MECS) http://www.bath.ac.uk/mech-eng/mecs/

      Chair of the Faculty of Engineering and Design IT Support Group

Reply to: