Before opening my nextcloud server to the internet i'm trying to harden its security by configuring its sshd_config file. Its a ubuntu core server so i can edit files only through sshfs.

The thing is, when i use sshfs to mount the server file system on my desktop then try to edit the file from the mountpoint i chose, i get permission denied for writing that file. I can view the file and the whole mounted file system but cannot edit it, despite sudoing.

I tried sshfs with the -o allow_root argument and the -o uid=0,gid=0 which gave me no success.

Thanks in advance for your help

  • Check the mount options do: mount. Is the filesystem mounted Read Only (ro)?
    – waltinator
    Commented Aug 29, 2023 at 16:40
  • the output of mount for the file system are the following : (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other). So it seems in read and write (rw) Commented Aug 29, 2023 at 21:12
  • What remote user did you connect as? allow_root is local to your system; the remote writes are always carried out as the user you logged in to the remote system as.
    – vidarlo
    Commented Aug 29, 2023 at 22:29

1 Answer 1


If you do sshfs [email protected], all writes are don as user, no matter what local user you do the modifications under.

Normal user accounts does not have access to modify system configuration files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .