-   Linux - General (
-   -   cannot create symlinks in a NAS share mounted over sshfs (

rfsleal 08-15-2012 06:56 PM

cannot create symlinks in a NAS share mounted over sshfs
Hi there:
I have a IOmega StorCenter NAS. When mounted over CIFS I could rsync local and remote directories, create hard and soft links, etc. When mounted over sshfs, I can recognize the existing directoy tree, follow symlinks to entire directories, etc. However I cannot create new soft links, it says I have not enough permissions. The share is mounted with the same uid,gid as the local user. I have tried every combination of options to no avail. Is this feature not implemented in sshfs?

Thanks and best regards.

jonsg 08-15-2012 07:08 PM

I don't have a means to test these myself immediately to hand, but have you investigated the "-o idmap=user" option? Also the "-o allow_other", "-o uid=<uid>" and "-o gid=<gid>" options? You might find something of use there.

rfsleal 08-16-2012 05:40 AM

I have tried with allow_root|allow_other,idmap=user,umask=777 and nearly all combinations possible. For instance, trying as root and with the allow_root switch:


root@poseidon:~$ sudo sshfs -o idmap=user,uid=1001,gid=1000,allow_root rleal@IPtomyNAS:/pools/A/A0/rleal backups
root@poseidon:~$ ls backups
ls: cannot access backups: Permission denied
rleal@poseidon:~$ su
su: Authentication failure
rleal@poseidon:~$ su
root@poseidon:/home/rleal# ll backups/
drwxr-xr-x  1 rleal rleal  19 Mar  9 22:25 2012-03-09T211636-papers/
drwxr-xr-x  1 rleal rleal  19 Apr 29 19:46 2012-04-29T185524-papers/
drwxr-xr-x  1 rleal rleal  19 May 27 20:31 2012-05-27T202748-papers/
lrwxrwxrwx  1 rleal rleal  26 May 27 20:31 current-papers -> ./2012-05-27T202748-papers/

root@poseidon:/home/rleal# cd backups/

root@poseidon:/home/rleal/backups# ln -s ./2012-05-27T202748-papers/ current-papers2
ln: failed to create symbolic link `current-papers2': Permission denied

The NAS is a Iomega StorCenter ix2-200 2 TB (2 x 1TB) Network Storage Cloud Edition .

Any ideas?


rfsleal 08-24-2012 09:55 AM

No ideas yet?

lleb 08-24-2012 10:17 AM

i did this the other day on a CentOS 5.4 box:

as root:

edit /etc/auto.master

at the bottom of that file under the +auto.master line i put the following:


/mnt/MYBOOK    /etc/auto.MYBOOK        --timeout=600  --ghost
then i made the file /etc/auto.MYBOOK and put the following in there:


winbox  -fstype=cifs,rw,noperm,username=foo,password=foo    ://
note the noperm and the fact that you have the IP/path_to_foo

it did not work for me with just the IP/ i had to have some directory under it or it would fail.

restart autofs (fyi ,this must be installed first sorry)

then make sure you can view the mountpoint:


[user@foo ~]$ ls -la /mnt/MYBOOK/winbox/
total 384
drwxrwxrwx 1 root root      0 Aug 19 18:30 .
drwxr-xr-x 3 root root      0 Aug 20 15:54 ..
drwxrwxrwx 1 root root      0 Aug 19 18:27 Blank DME orders
drwxrwxrwx 1 root root      0 Aug 19 18:26 Dr DME orders
-rwxrwSrwx 1 root root 348248 Aug 18 19:01 New Patient Forms.pdf
drwxrwxrwx 1 root root      0 Aug 19 18:30 Patient Orders

then make a symlink:


[user@foo ~]$ ln -s /mnt/MYBOOK/winbox/ /usr/rx30/Desktop/DME
now when ever the user tries to access the symlink the system will automount it seamlessly and things will behave nicely if there is a network hiccup as it will quietly disconnect the mount after 5min. you can reduce this by adjusting the auto.master file time.

rfsleal 08-26-2012 03:46 PM

Thanks for the response but didn't work. The system administrator keeps the SMB/CIFS port closed. Tried with -fstype=fuse as indicated here. The result is the same: creating symlinks within the share is not allowed. I also mounted the unit as a curlftpfs share but in this case the message was "ln: failed to create symbolic link [...] Function not implemented". Any clue?

lleb 08-27-2012 11:56 AM

if the system admin is blocking connection, then talk to the system admin and have them resolve their issue that is blocking your connectivity.

All times are GMT -5. The time now is 05:46 PM.