Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using sshfs with autofs on Ubuntu, I cannot set timestamps on remote files:

$ touch /sshfs/server/some/file
touch: setting times of `/sshfs/sshfs/server/some/file': Permission denied

I do have write access to the file. The problem surfaced because files copied to the remote don't get the original's timestamp, but the time of when the copy was done.

If I ssh to the server, I can also change the timestamp without trouble. It only fails through sshfs.

$ cat /etc/auto.sshfs 

afserver -fstype=fuse,sshfs_debug,rw,nodev,nonempty,noatime,allow_other,max_read=65536   :sshfs\#my_username@server.domain.lan:/

$ stat  /sshfs/server/some/file
Access: (0664/-rw-rw-r--)  Uid: ( 1003/ UNKNOWN)   Gid: (  100/   users)
share|improve this question
In case the problem persists, can you log into the server with account 'my_username' (the one you use for sshfs), execute ls -l /some/file, then execute id and post it? Can you run id logged in on your Ubuntu computer and post it too? – jaume Nov 8 '12 at 12:21

Judging from (FUSE mailing list - basically, what SSHFS implements), you are experiencing this problem, because filesystem used in /sshfs/server/some/ does not handle the attributes handler used. There is no solution whatsoever for SSHFS implementation that you are using.

Sorry, I didn't see that you have "noatime" option set. Why? Remove it. That should solve the issue here.

share|improve this answer
You obviously don't understand what noatime means/does. When you touch a file, the point is to set the mtime, not the atime. – Daniel Santos Sep 1 '14 at 7:03
Daniel, not exactly true. touching a file, gets you both, not just setting mtime. – Ernestas Sep 1 '14 at 10:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.