1

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\:

In the 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).

  • Is it the client a raspberry without Internet connection? – Rui F Ribeiro Jan 5 '18 at 20:18
  • Known bug ? github.com/libfuse/sshfs/issues/44 – steve Jan 5 '18 at 20:43
  • No, both are up are to date Linux Manjaro distributions. @steve From what I have seen, no this isn't the same. In this issue the date gets set as 0xffffff. My issue is that the date is actually epoch (0 or -1, I'm not quite sure) – Mia Jan 7 '18 at 12:59
  • The github link suggests it's an acknowledged bug and not fixed yet. Further, 0xffffff is -1, per en.wikipedia.org/wiki/Two's_complement – steve Jan 7 '18 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.