Hello,
im faiting with sshfs and fuse.
On local server im user "amnesia" (i have root privileges too when needed)
im "mounting" remote directory of the remote server using SSHFS program.
Im loging to root account on remote server... like:
sshfs root@remoteserverip:/remotedir /localdir
it appears that all folders/subfolders and files inside that mounted directory has root privileges (which seems correct because im mirroring an remote directory of an "root user"..), so i cant remotelly for example delete them being user "amnesia" (i cant do it from GNOME, but from terminal i can, still loged in as amnesia), not sure why.
Please how can i gain permissions to modiffy, create, delete in that mounted SSHFS folders as an local "amnesia" user?
permissions:
Code:
amnesia@amnesia:~/sshfs$ stat docs
File: `docs'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 17h/23d Inode: 612 Links: 1
Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-02-10 22:21:12.000000000 +0000
Modify: 2014-02-10 22:20:39.000000000 +0000
Change: 2014-02-10 22:20:39.000000000 +0000
Code:
amnesia@amnesia:~/sshfs$ stat truecrypt-7.1a-setup-x86
File: `truecrypt-7.1a-setup-x86'
Size: 2671271 Blocks: 5224 IO Block: 4096 regular file
Device: 17h/23d Inode: 418 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-02-10 20:36:44.000000000 +0000
Modify: 2012-02-07 10:26:40.000000000 +0000
Change: 2012-02-07 10:26:40.000000000 +0000
Code:
amnesia@amnesia:~/sshfs$ stat ../sshfs
File: `../sshfs'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 17h/23d Inode: 1 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-02-10 21:58:23.000000000 +0000
Modify: 2014-02-10 21:56:51.000000000 +0000
Change: 2014-02-10 21:56:51.000000000 +0000
FROM "man sshfs":
Quote:
FUSE options:
-o allow_other
allow access to other users
-o allow_root
allow access to root
|
Quote:
-o idmap=TYPE
user/group ID mapping, possible types are:
none no translation of the ID space (default)
user only translate UID of connecting user
|
but when i add idmap, it returns "read: Connection reset by peer"
!!!!!!!!!!!!!!!!!!!!!!!!!!!
Quote:
THis exact command worked:
mkdir mydir7;sshfs -o idmap=user root@extserverip:/home/mydir /home/amnesia/mydir7
(first create directory, then idmap=user not to be changed to username but should levave "user"
then folder stat:
File: `mydir7'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 15h/21d Inode: 1 Links: 1
Access: (0755/drwxr-xr-x) Uid: ( 1000/ amnesia) Gid: ( 0/ root)
Access: 2014-02-10 21:58:23.000000000 +0000
Modify: 2014-02-10 21:56:51.000000000 +0000
Change: 2014-02-10 21:56:51.000000000 +0000
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!
here is the full tutorial on how to achieve
SSHFS folder mounting.
Please anyone have idea how to fix my permissions in simple/any way?