SSHFS on startup CentOS 6.3

Posted by salamis on Server Fault See other posts from Server Fault or by salamis
Published on 2012-10-03T08:18:32Z Indexed on 2012/10/03 9:39 UTC
Read the original article Hit count: 180

Filed under:
|
|

I edited the file /etc/rc.d/rc.local and added the following lines in order to mount a remote directory through sshfs at boot time:

su user -c "/usr/bin/sshfs -o idmap=user -o reconnect -o allow_other -o uid=500 -o gid=500  user@remote:/home/shares/allusers /home/user/mnt"

The problem is that is not mounting the directory on startup but when I execute this command manually after logging in everything works as expected an the directory is mounted.

Any suggestions?

© Server Fault or respective owner

Related posts about centos

Related posts about centos6