Remote folder shared normally

Remote folder shared normally

Postby mdi » Tue Mar 29, 2022 8:24 am

Hi, is it possible to add a remote share and have it shared normally?

I mean: I have an old NAS (Seagate Black Armor 220) which doesn't support Samba > 1.
I am able to access it via my Network Space 2, so I though that if I can mount it in my NWSP2, I could share through it.

I know how to mount the old NAS as a remote share, but remote shares seem to be usable only for backup purposes and cannot published as normal shares.

Thanks for any info.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Remote folder shared normally

Postby Jocko » Tue Mar 29, 2022 9:37 am

Hi mdi

mdi wrote:I know how to mount the old NAS as a remote share, but remote shares seem to be usable only for backup purposes and cannot published as normal shares.
indeed it is the expected behaviour.

The way would be to create a normal share and to duplicate the mountpoint (bind option) with the remote share on the root share folder. BUT it is a dangerous way as the firmware on several actions tries to delete the root folder of the share. So as it is not an usb share, it does not run an unmount command before and then your data on the remote share will be deleted on such actions...

You could try to create a symlink in the share targetting the mountpoint of the remote share (in /direct-usb folder). But maybe the symlink won't follow the symlink
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Remote folder shared normally

Postby mdi » Wed Mar 30, 2022 12:05 pm

Hi Jocko, I tried that, but a soft-link doesn't work when accessing the share from windows+samba.
On the other hand, hard-links cannot be done against a directory.

Is there another solution? I saw the remote folder appears together with the other shares, but somehow it is not shown via Samba. Would it be possible to make it appearing and accessible in a direct way?

Thanks.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Remote folder shared normally

Postby Jocko » Wed Mar 30, 2022 2:51 pm

Hi mdi,

It is not easy because we set the firmware so that it can not use a remote share over samba server. For example, you can not use the mountpoint name as share name

So I think the way is to write directly in smb.conf file but this one is overwritten as each time you edit/rename/delete... a share and same thing with user account. So you have to use an additional smb.conf file. As there is no directive to set an additional conf file path with samba, we need to copy its content in the main conf file at each time the firmware overwrites it what I just did

So the additional conf filename is 'smb_add.conf' and its location is /rw_fs/etc and you have to edit it. it contains an example for a private share. To update the samba conf you just have to edit any share and save it without doing changes( like this smb.conf will be updated)

To install the new files, do
Code: Select all
plugout download 6939
tar -xf /tmp/fvdw-sl_remoteshareoversmb_31mar2022.tgz -C /


See if it works as you want
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Remote folder shared normally

Postby mdi » Thu Mar 31, 2022 10:15 pm

That was cool, thanks!
I was able to see the share, but i cannot write to it, as i get a permission error.

On the old NAS I created the same user/pw of my NWSP2 and remounted the share, but it didn't help.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Remote folder shared normally

Postby Jocko » Fri Apr 01, 2022 6:44 am

Hi,

mdi wrote:On the old NAS I created the same user/pw of my NWSP2 and remounted the share, but it didn't help.
And did you remount the remote share by using this account ?
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Remote folder shared normally

Postby mdi » Fri Apr 01, 2022 7:17 am

Yes, I remounted the new share in the NWSP2, because it was unmounted automatically due to the change of account. I removed it and remounted with the new credentials.

I also remounted it in windows with the new credentials, as a permanent new drive (R:), but same issue. I can access my public share inside the NAS and also the new share, but I cannot write in the new share.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Remote folder shared normally

Postby mdi » Fri Apr 22, 2022 7:35 am

It's curios. After some time without touching anything, I can directly access my new Seagate share as //ip.address/share, but still if the same is shared through my NWSP2 I can read it, but to write to it I receive an error saying I need the write permission.

In the samba cfg I set my user in the write list, no users in the read list. I tried setting the samba "read only" setting to "no" too.

In all cases I'm able to read it, but not write to it. With direct access I can correctly read/write.

Here is the definition of my extra share (manually changed my ip to xxx.yyy below):

Code: Select all
[NAS-Seagate]
#comment = yourcomment
comment = NAS-Seagate (BlackArmor 220)
#path = /direct-usb/yourMountPointName
path = /share/1000/192.168.xxx.yyy-smb-public
#invalid users = root user1 user2 ....(all other username without a read or write access and keep root user in the list)
invalid users = root dummy
#read list = user_read1 user_read2 (all other read username)
read list =
read only = no
#write list = user_write1 user_write2 (all other write username)
write list = mdi hanna
printable = no
ea support = yes
# with samba4 version uncomment the following lines
vfs objects = catia fruit streams_depot
streams_depot:delete_lost = yes
fruit:resource = file
fruit:metadata = netatalk
fruit:locking = netatalk
fruit:encoding = native


Here is the mounted share in /share/1000:
Code: Select all
drwxr-xr-x   2 root root     0 2000-03-02 14:41 192.168.xxx.yyy-smb-public
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Re: Remote folder shared normally

Postby Jocko » Sat Apr 23, 2022 1:42 pm

Hi

Currently, only root account has write permissions on the mount point of the remote share (it is enough for running backup).

So try again after setting write permissions for other users
Code: Select all
chmod 777  /share/1000/192.168.xxx.yyy-smb-public
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Remote folder shared normally

Postby mdi » Fri Apr 29, 2022 10:12 am

Hi, I tried, but no luck:

Code: Select all
root@nas:/share/1000 # ls -ld 192*public
drwxr-xr-x  2 root root 0 2000-03-02 15:04 192.168.xxx.yyy-smb-public
root@nas:/share/1000 # chmod 777 192*public
root@nas:/share/1000 # ls -ld 192*public
drwxr-xr-x  2 root root 0 2000-03-02 15:04 192.168.xxx.yyy-smb-public
root@nas:/share/1000 # chmod 777 192.168.xxx.yyy-smb-public
drwxr-xr-x  2 root root 0 2000-03-02 15:04 192.168.xxx.yyy-smb-public


The share was mounted though.
mdi
Donator VIP
Donator VIP
 
Posts: 188
Joined: Tue Oct 11, 2011 1:20 pm

Next

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 1 guest