Closed shajianrui closed 5 years ago
Please test latest version from git. Samba requires a hardlink count of at least 2 for directories, so that is what archivemount now (wrongfully) returns. If I had more time I'd rather investigate why the whole world has implemented workarounds for this for years instead of fixing it in Samba...
Am 7. Januar 2019 14:46:42 MEZ schrieb shajianrui notifications@github.com:
For example, I have a test.tar which has a structure below.
[root@localhost home]# tar -tvf test.tar
drwxrwxrwx root/root 0 2019-01-06 16:54 testd1/
drwxr-xr-x root/root 0 2019-01-06 16:54 testd1/testd11/
drwxr-xr-x root/root 0 2019-01-06 16:53 testd2/
drwxr-xr-x root/root 0 2019-01-06 16:53 testd3/
-rw-r--r-- root/root 58 2019-01-06 22:47 testf1
-rw-r--r-- root/root 73 2019-01-06 16:54 testf2
I mount this tar at /srv/sambadir/tarmount with command below:
archivemount /home/test.tar /srv/sharedir/tarmount -o allow_other
The directory 'tarmount' and its content is okay.Then I set a samba shared at /srv/sharedir.
[root@localhost home]# cat /etc/samba/smb.conf
[global]
workgroup = SAMBA
security = use
passdb backend = tdbsam
map to guest = Bad User
[TESTINNERMOUNT]
comment = inner mount
path = /srv/sambadir
readonly = yes
guest ok = no
When I try to connect to the share files, I find that the directory 'tarmount' becomes a file with size 0. I have tried it on Windows, Ubuntu GUI, smbclient and 'mount -t cifs', and it behaved in the same way.
Firstly I thought that it might be a problem of fuse so I tried the example 'hello' in both fuse-3.4.1 and fuse-2.9.2 but they turned out to be okay. I also tried the example 'fusexmp' in fuse-2.9.2(Not provided in 3.4.1) and it did well too.
That is why I concern it as a problem of archivemount itself. Please locate this problem and get it fixed, THANKS!!!
Samba Server Environment: CentOS-7-1810. samba-4.8.3 installed from yum. archivemount compiled with libfuse-2.9.2.
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/cybernoid/archivemount/issues/3
Thanks for fixing it. It works and the mountpoint shows up as a directory but there is still something wrong.
NOTE:All problem listed below shows up while accessing the samba-share. Accessing the mounted files in local CLI is ok.
The regular files inside the mountpoint dir are not readable. In windows explorer when I try to open the files with notepad.exe it prompts me that cannot find the files. In Ubuntu the files just disappear. If I mount the share with mount -t cifs and try to open the files with vi, It just create new files with their name.
And actually It fails to load the permission setting of those files in Windows. I haven’t checked this under Linux CLI.
There is nothing wrong with the sub-directories.
Should work now, please give it a try.
Am 8. Januar 2019 09:36:29 MEZ schrieb shajianrui notifications@github.com:
Thanks for fixing it. It works and the mountpoint shows up as a directory but there is still something wrong.>
NOTE:All problem listed below shows up while accessing the samba-share. Accessing the mounted files in local CLI is ok.>
The regular files inside the mountpoint dir are not readable. In windows explorer when I try to open the files with notepad.exe it prompts me that cannot find the files. In Ubuntu the files just disappear. If I mount the share with mount -t cifs and try to open the files with vi, It just create new files with their name.>
And actually It fails to load the permission setting of those files in Windows. I haven’t checked this under Linux CLI.>
There is nothing wrong with the sub-directories. >
-- > You are receiving this because you commented.> Reply to this email directly or view it on GitHub:> https://github.com/cybernoid/archivemount/issues/3#issuecomment-452216228
Thanks, it works.
For example, I have a test.tar which has a structure below.
[root@localhost home]# tar -tvf test.tar
drwxrwxrwx root/root 0 2019-01-06 16:54 testd1/
drwxr-xr-x root/root 0 2019-01-06 16:54 testd1/testd11/
drwxr-xr-x root/root 0 2019-01-06 16:53 testd2/
drwxr-xr-x root/root 0 2019-01-06 16:53 testd3/
-rw-r--r-- root/root 58 2019-01-06 22:47 testf1
-rw-r--r-- root/root 73 2019-01-06 16:54 testf2
I mount this tar at /srv/sambadir/tarmount with command below:
archivemount /home/test.tar /srv/sharedir/tarmount -o allow_other
The directory 'tarmount' and its content is okay.Then I set a samba shared at /srv/sharedir.
[root@localhost home]# cat /etc/samba/smb.conf
[global]
workgroup = SAMBA
security = use
passdb backend = tdbsam
map to guest = Bad User
[TESTINNERMOUNT]
comment = inner mount
path = /srv/sambadir
readonly = yes
guest ok = no
When I try to connect to the share files, I find that the directory 'tarmount' becomes a file with size 0. I have tried it on Windows, Ubuntu GUI, smbclient and 'mount -t cifs', and it behaved in the same way. However, when I umount it, the 'tarmount' turn back to a directory.
Firstly I thought that it might be a problem of fuse so I tried the example 'hello' in both fuse-3.4.1 and fuse-2.9.2 but they turned out to be okay. I also tried the example 'fusexmp' in fuse-2.9.2(Not provided in 3.4.1) and it did well too.
That is why I concern it as a problem of archivemount itself. Please locate this problem and get it fixed, THANKS!!!
Samba Server Environment: CentOS-7-1810. samba-4.8.3 installed from yum. archivemount compiled with libfuse-2.9.2.