Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I am trying to mount a folder from another computer in my LAN, and I am able to ssh without any issues. But, I am unable to make any changes when I access the mounted folder.

This is what I have done so far:

Install:

$sudo apt-get install sshfs
$sudo modprobe fuse
$sudo adduser <username> fuse
$sudo chown root:fuse /dev/fuse
$sudo chmod +x /dev/fuse
$mkdir ~/remoteserv

And when I access the remote folder via sshfs:

$sshfs -o idmap=user <username>@<ipaddress>:/home/user ~/remoteserv

The output of becomes:

$~/remoteserv$ ls -l
total 60
drwxr-xr-x 1 <notmyusername> <notmyusername> 4096 2012-04-13 21:54 Desktop
drwxr-xr-x 1 <notmyusername> <notmyusername> 4096 2012-04-10 13:05 Documents
drwxr-xr-x 1 <notmyusername> <notmyusername> 4096 2012-04-17 19:06 Downloads
drwxr-xr-x 1 <notmyusername> <notmyusername> 4096 2012-04-13 21:55 Music
drwxr-xr-x 1 <notmyusername> <notmyusername> 4096 2012-04-03 15:07 Pictures
... more of the same

I am unable to access any of the files properly because sshfs is mounting the files under my wife's username! I have no idea why, and I feel like I have made a large mistake somewhere. Is there some configuration file which I need to tweak somewhere? I can't seem to find anything on the manpage :/

I even tried an -o allow_other option when I mounted, but it still mounted it under my wife's username! What is going on?

share|improve this question
add comment

1 Answer 1

It's worth a try to explicitly set the UID/GID. This could be done, for example, using:

-o uid=$(id -u) -o gid=$(id -g)

(together with setting the username with -o idmap=<yourusername>).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.