shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
While working on setting new squid transparent proxy in network.I faced an unusual error while restarting the Squid service.
The getcwd() function copies an absolute pathname of the current working directory to the array pointed to by buf, which is of lengthsize. (For more info Read man page of getcwd)
Solution : To solve this issue. I change the directory to / root by using command cd /
.After this I again restarted the squid service.The problem did not occur then.
Below is the reference from my system
[root@localhost modules]# /etc/init.d/squid restart shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory Stopping squid: ................ [ OK ] Starting squid: . [ OK ] [root@localhost modules]# cd / [root@localhost /]# /etc/init.d/squid restart Stopping squid: ................ [ OK ] Starting squid: . [ OK ] [root@localhost /]#