You are here

Mounting an FTP/SMB site as a Linux Share


sudo apt-get install curlftpfs
mkdir mntdir #make mountpoint
FTPPW=12345678
FTPUSER=username%40site.org # if contains @ then use %40
sudo curlftpfs -o allow_other,uid=1000 ftp://$FTPUSER:$FTPPW@ftp.site.org mntdir

The uid is needed if you want write access for a non-root user. Find it by typing id at the console.
You will have to edit /etc/fuse.conf to allow_other and also make sure the current user is a member of the fuse group:

adduser andrewf fuse

Add to /init/fstab using:

curlftpfs#user:pass@ftp.site.org /home/andrewf/xxx fuse rw,uid=1000,user,noauto 0 0

You can unmount with:

fusermount -u mountpoint # use -u -z to force

To mount a Samba share you can create a mount script such as:

mount -t smbfs //Stillwaterfs/Users/Andrew /home/andrewf/sw -o username=Andrewf,uid=andrewf

or on Red Hat:

sudo mount -t cifs //Stillwaterfs/Users/Andrew /home/andrewf/sw -o username=Andrewf,uid=andrewf