mount snippets

Mount a network drive with proper privileges

Tagged smbfs, samba, mount, smbmount, permissions, filesystem, network drive, linux  Languages bash

This is not a snippet either, but I always forget how the local permissions for a Samba mount are given, which is the reason I put it here. Uid is the id of the user you want to mount the drive as, and gid is respectively the group id. Username is the username you want to connect with.

sudo mount -t smbfs -o uid=1000,gid=1000,username=marko //remote_server/work /mnt/net/stage/work

Mounting a remote network drive with SSHFS on OSX

Tagged sshfs, mount, remote, drive, osx  Languages bash
  1. Install SSHFS

http://code.google.com/p/macfuse/

  1. Read documentation

http://code.google.com/p/macfuse/wiki/MACFUSE\_FS\_SSHFS

  1. Create symlink
ln -s /Applications/sshfs.app/Contents/Resources/sshfs-static /usr/local/bin/sshfs
  1. Mount drive
mkdir /Volumes/mount_name
sshfs -p 666 server:/ /Volumes/mount_name -oreconnect,ping_diskarb,volname=mount_name
  1. References

http://lifehacker.com/software/ssh/geek-to-live--mount-a-file-system-on-your-mac-over-ssh-246129.php