You are not logged in.

#1 2018-01-15 21:57:24

herOldMan
Member
Registered: 2013-10-11
Posts: 151

script hang when sshfs mounted through fstab and filewall blocks all

I have an sshfs mount through fstab:

 him@192.168.1.37:/home/him /home/me/myMount fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,allow_other,reconnect 0 0

I have a script that uses zenity for a file picker:

#!/bin/bash

# Use zenity to fetch a file name.
string.
if [ -z "$1" ]
  then
    aFile=`zenity --file-selection --title="Source"`
fi

ls -la $aFile

All is well so far.

But, the script will hang - just after OK is clicked on the zenity dialog - if I create the following two firewall rules before running it:

iptables -A INPUT -j DROP
iptables -A OUTPUT -j DROP

This occurs whether recently-used.xbel is immutable or not. It does not occur if the sshfs line in fstab is commented. It still occurs when the firewall allows input & output to the 192.168.1.0/24 subnet.

How can I make my script run when I mount via sshfs through fstab and subsequently initiate my iptables rules?

Offline

Board footer

Powered by FluxBB