Hi all,
I want to mount a remote smb share in Syncthing (Jail), but it seems not work.
I have a remote smb share (Server01, 192.168.0.1) and a Server02 (192.168.0.2)
And install a Syncthing in Jail (192.168.0.3)
Server01 - 192.168.0.1
Server02 - 192.168.0.2
Syncthing (Jail) - 192.168.0.3
Server01 is a remote smb server not a FreeBSD server
Server02 version: FreeBSD 12.2
Here what i done.
Since it cannot direct mount a smb in jails, so I make a directory in Server02
- /mnt/Server01
Mount smb share (Server01) in Server02, not in jails
-
which "983" is the UID and GID of syncthing.
and "user01" have full permission right to "folder01" and subfolder
and add a Mount point in Jails
- /mnt/Server01 to /mnt/iocage/jails/Syncthing/root/mnt/Server01
Restart Syncthing
Check the user right in Syncthing console, use ls -sl, it shows
it seems same as the original folder right.
But Syncthing cannot sync the file to Server01, it said permission denied with "syncing: rename"
It can sync file to Server02 folder (i.e. InternalStorage).
And in console, as root@Syncthing, I can create file in /mnt/Server01, but cannot remove or rename the file.
I try login Server02 ssh with 'user01". (i.e. the user mount the remote smb server on Server01 & have the full permission right to "folder01" on Server01 and subfolder)
and test the mount point (i.e. /mnt/Server01),
I can 'touch', 'rm' and 'mv' the file.
But when I enter the console of Syncthing in Server02 Jail, (root@Syncthing)
I can 'touch' a file only but cannot 'rm' and 'mv' the file.
And here is theoutput of iocage fstab -e Syncthing
I set a password of 'syncthing' in Server02 ,
And test the mount point outside the jails,
it also can 'touch', 'rm' and 'mv' the file.
And Hints? Thanks!
I want to mount a remote smb share in Syncthing (Jail), but it seems not work.
I have a remote smb share (Server01, 192.168.0.1) and a Server02 (192.168.0.2)
And install a Syncthing in Jail (192.168.0.3)
Server01 - 192.168.0.1
Server02 - 192.168.0.2
Syncthing (Jail) - 192.168.0.3
Server01 is a remote smb server not a FreeBSD server
Server02 version: FreeBSD 12.2
Here what i done.
Since it cannot direct mount a smb in jails, so I make a directory in Server02
- /mnt/Server01
Mount smb share (Server01) in Server02, not in jails
-
mount_smbfs -u 983 -g 983 -d 770 -f 770 -I 192.168.0.1 //user01@Server01/folder01 /mnt/Server01
which "983" is the UID and GID of syncthing.
and "user01" have full permission right to "folder01" and subfolder
and add a Mount point in Jails
- /mnt/Server01 to /mnt/iocage/jails/Syncthing/root/mnt/Server01
Restart Syncthing
Check the user right in Syncthing console, use ls -sl, it shows
Code:
total 17
1 drwxrwx---+ 3 syncthing syncthing 3 Jun 15 15:29 InternalStorage
16 drwxrwx--- 1 syncthing syncthing 16384 Jun 17 15:18 Server01
it seems same as the original folder right.
But Syncthing cannot sync the file to Server01, it said permission denied with "syncing: rename"
It can sync file to Server02 folder (i.e. InternalStorage).
And in console, as root@Syncthing, I can create file in /mnt/Server01, but cannot remove or rename the file.
I try login Server02 ssh with 'user01". (i.e. the user mount the remote smb server on Server01 & have the full permission right to "folder01" on Server01 and subfolder)
and test the mount point (i.e. /mnt/Server01),
I can 'touch', 'rm' and 'mv' the file.
But when I enter the console of Syncthing in Server02 Jail, (root@Syncthing)
I can 'touch' a file only but cannot 'rm' and 'mv' the file.
And here is theoutput of iocage fstab -e Syncthing
Code:
/mnt/Disk2/Syncthing /mnt/Disk1/iocage/jails/Syncthing/root/mnt/Syncthing nullfs rw 0 0
/mnt/Server01 /mnt/Disk1/iocage/jails/SyncThing/root/mnt/Server01 nullfs rw 0 0
I set a password of 'syncthing' in Server02 ,
And test the mount point outside the jails,
it also can 'touch', 'rm' and 'mv' the file.
And Hints? Thanks!
Last edited by a moderator: