Score:0

cannot write a remotely mounted file

gl flag

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

waltinator avatar
it flag
Check the `mount` options do: `mount`. Is the filesystem mounted Read Only (`ro`)?
Lorenzo_Kospecz avatar
gl flag
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)
vidarlo avatar
om flag
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.
Score:0
om flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.