sshfs mount issues with fstab
Hello all. playing around with sshfs and fstab for mount/umount as user. I have a mount point created by user /usr/rx30/remote and a fstab entry:
Code:
sshfs#rx30@xxx.xxx.xxx.xxx:/usr/rx30 /usr/rx30/remote fuse users,noauto,rw 0 0 in visudo i have added /bin/mount /usr/rx30/remote, /bin/umount /usr/rx30/remote at the end of the user line. when i try to mount as user i get permission errors. Code:
[rx30@rx30 ~]$ mount /usr/rx30/remote/ Code:
# sudoers file. |
So what happens if you actually try
Code:
sudo mount /usr/rx30/remote/ |
it prompts for password, then craps out saying that my user can not do that.
Code:
[rx30@rx30 ~]$ sudo mount /usr/rx30/remote/ |
but as root this is exactly what I want to happen:
Code:
[root@rx30 ~]# mount /usr/rx30/remote/ |
found the problem. /usr/bin/fusermount didnt have correct permissions.
Code:
# chmod +x /usr/bin/fusermount |
just wanted to add some more notes for those who come after and read this thread.
Snooping around to find a better way of setting up my rsa public key between the 2 servers for the sshfs to work better, i found a nice bit of code that really cuts down on the time and effort setting up the pub/private key pair between systems. 1. On the computer you want to connect FROM generate your rsa key as follows: Code:
[user@server .ssh]$ ssh-keygen -t rsa -b 4096 Once the key pair is generated you will want to get the id_rsa.pub to the computer you want to CONNECT TO. this is the nice bit of code I found this morning. Code:
ssh-copy-id -i ~/.ssh/id_rsa.pub user@IP Enjoy this little tidbit and the power of sshfs. (note on performance) After mounting the sshfs I performed both a cp -Ravf and a rsync -aviS on that mount point to a /tmp/foo and timed this. The mount point contains roughly 3.3G worth of data and we are on a true gigabit LAN. The remote computer is a very old system running a P4 with 1G RAM, while the newer (local) box is a Dell T3500 with Intel(R) Xeon(R) CPU W3503 @ 2.40GHz 4G RAM so a bit more powerful. Both the cp and the rsync took roughly 1.5min. Then i ran scp from the other computer to push the same data across the LAN. this took slightly over 2min. some nice food for thought. |
All times are GMT -5. The time now is 11:41 PM. |