I wish to mount a remote Linux directory to my local laptop using sshfs. I do this by using autofs. In
/etc/autofs/, I therefore have in the
auto.ssh file (I used the Arch wiki to guide me for the options I should use):
cluster -fstype=fuse,rw,allow_other,IdentityFile=/home/mia/.ssh/id_rsa :sshfs\#mia@host\:
auto.master file I added the line:
/home/mia/remote /etc/autofs/auto.ssh uid=1000,gid=1000,--ghost,--timeout=60
The folder is successfully mounted and its date is accurate:
drwxr-xr-x 4 root root 0 Jan 5 19:51 remote
However, if I create a new file inside the remote folder, the file's date is epoch (01-01-1970).
$ cd remote/cluster $ touch test $ ls -l test -rw-r--r-- 1 mia mia 0 Jan 1 1970 test
I have searched the man pages of mount, mount.fuse, sshfs, autofs but to no avail. I haven't been either able to determine if this was a bug or a feature. Is there any way to have the current date on newly created files?
In addition, I would like to know how to make the parent directory (
remote) own by me (mia).