Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved]problems with sshfs for to mount in writing

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
noproblem
Posts: 6
Joined: 2018-06-15 04:30
Location: Italy

[Solved]problems with sshfs for to mount in writing

#1 Post by noproblem »

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
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: problems with sshfs for to mount in writing

#2 Post by dilberts_left_nut »

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
noproblem
Posts: 6
Joined: 2018-06-15 04:30
Location: Italy

Re: problems with sshfs for to mount in writing

#3 Post by noproblem »

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
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: problems with sshfs for to mount in writing

#4 Post by debiman »

so it is solved now?

User avatar
noproblem
Posts: 6
Joined: 2018-06-15 04:30
Location: Italy

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

#5 Post by noproblem »

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

Post Reply