the best about samba:

thanks for samba, it provides users with a fast (of course depends also on harddisk speed) rock-solid no-limit-to-maximum-users file-server for maximum file-transfer-and-sharing-and-storage productivity (and they will USE that T: temp drive for EVERYTHING! prepare for TERRABYTES OF DATA!)

in case: how to mount smb?

https://dwaves.de/2015/06/23/linux-mount-windows-samba-share-as-linux-client/

greetings from ethernal blue – linux cifs smb windows share mount fails with “mount error(112): host is down” – no it is not

best hint ever: if there is an errors while smb mounting!

like “Mounting cifs drive gives: mount error(22): Invalid argument”

have a separate root-terminal open that is running this “debug the logs live” script

https://dwaves.de/2017/06/15/linux-monitor-all-logs-in-real-time-d-follow-all-show-changes-to-log-files-under-varlog/

what speeds to expect:

mounting samba-over-ssh-over-tcpip-over-internet is (of course) sloooow(er), because all that data goes through an encrypted channel plus slow-internet connection.

but it works! 🙂

if /mnt/cifs/here is owned by non-root user, also non-root users are allowed to mount.
(which is rather tricky with mount cifs)

the alternative: sshfs

requirements:

server:

  • have OpenSSH installed
  • allow root login

client:

  • have sshfs installed
# it should be possible to give non-root access to the sshfs mounted folder
# make sure the user has the same USERID:GROUPID on client and server
hostnamectl; # system tested with client and server
Operating System: Debian GNU/Linux 10 (buster)
Kernel: Linux 4.19.0-14-amd64
Architecture: x86-64

sshfs --version
SSHFS version 2.10.0
FUSE library version: 2.9.9
fusermount version: 2.9.9
using FUSE kernel interface version 7.19

# what userid has the non-root user?
id -u
1000

# become root
su - root;
# setup software
apt install sshfs
# for CentOS8 checkout this guide
# how to enable power tools repo
yum install fuse-sshfs.x86_64

# as root create mount point
# this is perfect for GNU Linux (Debian) desktop gui users
mkdir -p /media/user/sshfs

# this is perfect for GNU Linux (rpm/Fedora/CentOS/Redhat) desktop gui users
mkdir -p /run/media/user/sshfs
# hand over ownership of mount point to default-non-root user
chown -R user:user /media/user/sshfs

# try to mount
sshfs -o allow_other,default_permissions root@ip.of.server.ssh:/mount/this/folder /media/user/sshfs

# alternatively
sshfs user@ip.of.server.ssh:/mount/this/folder/ /media/user/sshfs/ -o allow_other -o idmap=user -o uid=1000 -o gid=1000

# if it complains
fuse: unknown option `idmap=user'
# just leave out -o idmap=user

Links:

https://wiki.ubuntuusers.de/FUSE/sshfs/

https://serverfault.com/questions/736523/sshfs-permission-denied-even-for-root-user

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin