0

Needing to link a SMB share directory to a empty directory with a FTP share. There is a empty directory inside of FTP_Share1 called smbshare which I am trying to link to SMB_Share1 to access all of those directories/files.

[root@freenas /mnt/Mike_Volume]# ls -l                                          
total 37                                                                        
drwxrwxrwx   5 root  FTPgrp   5 Jul 12 12:18 FTP_Share1                         
drwxrwxrwx   3 root  wheel    3 Jun 26 21:42 NExtCloud_Share1                   
drwxrwxr-x   2 root  Shares   2 Jun 26 11:28 NFS_share1                         
drwxrwxr-x  10 root  Shares  10 Jul  9 22:19 SMB_Share1                         
drwxr-xr-x   7 root  wheel    7 Jun 26 15:48 jails                              
[root@freenas /mnt/Mike_Volume]#

#ls -l FTP_Share1
total 19                                                                        
drwxrwxr-x  4 mike  FTPgrp  5 Jul 12 10:36 Mike                                 
drwxrwxrwx  5 mike  FTPgrp  5 Jul 11 16:20 Support                              
drwxrwxrwx  2 root  FTPgrp  2 Jul 12 12:24 smbshare                             
[root@freenas /mnt/Mike_Volume/FTP_Share1]#

smbshare is a new empty directory. So i have tried using

#ln -s /mnt/Mike_Volume/SMB_share1 smbshare

this creates the symbolic link successfully

[root@freenas /mnt/Mike_Volume/FTP_Share1]# ls smbshare                         
SMB_Share1                                                                      
[root@freenas /mnt/Mike_Volume/FTP_Share1]# ls smbshare/SMB_Share1              
AmazonCloud             Downloads               dos stuff                       
DRIVERS                 Tools                   virtuals                        
Disk-Images             WinImagePortable                                        
[root@freenas /mnt/Mike_Volume/FTP_Share1]#

and you can cd or list the files within that symbolic link however when you attempt to FTP client it does not think that SMB_Share1 is a valid directory or even exists

{FTP DATA}
CWD /smbshare/SMB_Share1  
CWD /smbshare  
Transferred 98 bytes in 0.008 seconds  
CWD /smbshare/SMB_Share1/  
**550 /smbshare/SMB_Share1/: No such file or directory**  
PWD  
257 "/smbshare" is the current directory  
PASV  

And windows FTP thinks its just a shortcut which does nothing but tries to download the link , either way i cannot access the files i need on the SMB_Share1 through FTP using ln -s command. Any ideas?

Windows FTP shortcut

  • Maybe check the user rights (are login user and FTP/SMB server's users allowed to enter?) and that your servers are configured to allow following links. – Jaleks Jul 12 '17 at 21:12
0

Try bind mounts.

Out of man mount:

Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is:

mount --bind olddir newdir

or by using this fstab entry:

/olddir /newdir none bind
  • This does not work, mount -bind indicates -b is a illegal operation [root@freenas /mnt/Mike_Volume/FTP_Share1]# mount -bind /mnt/Mike_Volme/FTP_Share1/smbshare /mnt/Mike_Volume/SMB_Share mount: illegal option -- b usage: mount [-adflpruvw] [-F fstab] [-o options] [-t ufs | external_type] – Michael Perugini Jul 16 '17 at 18:42
  • Would need to use --bind like I wrote – Ziazis Jul 16 '17 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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