[Solved]problems with sshfs for to mount in writing

Kernels & Hardware, configuring network, installing services

[Solved]problems with sshfs for to mount in writing

Postby noproblem » 2018-06-15 04:58

I have a server with raspberry pi with raspbian 9 installed
I can entry in ssh
I can to read with sshfs
on my client pc I installed debian 9, fuse and sshfs
I do not have the fuse group, in the my client with debian 9
my uid-gid are = 1000 same for the client and for the server
I created a local directory in the home called sshfs-dir, then of the my user with write and read permissions
after the sshfs command, the files and directories contained in sshfs-dir, are owned by root and of the root group
so I can not write either as user or as root but I can only to read.
some ideas about it about how to can write on the remote directory? thanks
Last edited by noproblem on 2018-06-15 22:24, edited 1 time in total.
nothing is born from the diamonds ... the flowers are born from the manure
User avatar
noproblem
 
Posts: 6
Joined: 2018-06-15 04:30
Location: Italy

Re: problems with sshfs for to mount in writing

Postby dilberts_left_nut » 2018-06-15 06:05

Can’t really tell from your description.
Show your working...
Post the commands and output, along with some ‘ls -l’ output (in text in a code box - not a screenshot).
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4902
Joined: 2009-10-05 07:54
Location: enzed

Re: problems with sshfs for to mount in writing

Postby noproblem » 2018-06-15 10:03

First of all, thank you very much for your answer.
I create a directory as mount point in the client pc
Code: Select all
$ mkdir mount_point

then I mount the remote directory in the mount point
Code: Select all
$ sshfs -p port_number user_ssh@domain:/remote_directory/ /mount_point/

my problem is that the remote directory is located in
Code: Select all
/var/www/

so the directory owner is certainly root
that's why I could not write on the directory just mounted
so I solved by moving the remote folder to
Code: Select all
/home/site/

where the owner is clearly user
now I can to write quietly into directory
nothing is born from the diamonds ... the flowers are born from the manure
User avatar
noproblem
 
Posts: 6
Joined: 2018-06-15 04:30
Location: Italy

Re: problems with sshfs for to mount in writing

Postby debiman » 2018-06-15 17:45

so it is solved now?
User avatar
debiman
 
Posts: 3027
Joined: 2013-03-12 07:18

Re: [Solved]problems with sshfs for to mount in writing

Postby noproblem » 2018-06-15 23:00

certainly, I solved!
with the procediment described above, if the remote directory has as owner the superuser, I can to mount the filesystem in only read;
while if I want to mount a remote directory, also for write into it, is better that I use an directory that has as owner the my user, or I can also to change the his owner, with
Code: Select all
# chown -R user remote_directory

and the his group with
Code: Select all
# chgrp -R user remote_directory

and sometimes the permits, for example with
Code: Select all
# chmod -R 744 remote_directory

thank to all :D
nothing is born from the diamonds ... the flowers are born from the manure
User avatar
noproblem
 
Posts: 6
Joined: 2018-06-15 04:30
Location: Italy


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable