NSA325v2 - Entware-ng - SAMBA - no samba after hot NAS restart
All Replies
-
Hi Mijzelf,
I am not sure how to proceed from here.
And what worries me that my shares are not under Volume1 as it was before. Plus file system has been repaired and I am not sure if and what could cause it, and if anything else is broken.
My plan now is to copy what I can to another NAS and drop Volume1 on this affected NAS325v2 do a factory reset, create and format new RAID1 Volume1 and maybe then install entware-ng and dropbear from scratch.If you can advise me how to remove any leftovers of dropbear, entware-ng and anything else I would appreciate it.
If you see any flaws in such plan please let me know.
Regards, -A
0 -
I don't know how to proceed either. It's not clear how Entware could interfere with pam. Or pure-ftpd. They are in different environments.
It is possible that a clear error message is spit to console. Which is on the serial port at a NSA325.
Another option could be to start pure-ftpd in strace, which will generate a huge log of system calls. Then login on ftp with both Entware enabled and disabled. The difference in the logs might point to the actual problem. But that it a pretty low-level debugging option. And if the problem is in another process (then pure-ftpd) strace won't see it.
If you can advise me how to remove any leftovers of dropbear, entware-ng and anything else I would appreciate it.
If you delete the volume it's all gone. Basically there are 3 places where something could be stored. On /dev/sda1, which is deleted on a firmware update, on the flash partition dedicated for config (which is mounted on /etc/zyxel/), which is erased on factory reset, and on a data volume, which is deleted when you delete the volume.
0 -
a quick update:
first of all I completed copying stuff from affected NAS to another as a backup - which is always good.
then I start looking into the thread from the beginning and I tried to find out what could stop samba from working.
it seems there were two files blocking start of SAMBA in /opt/var/run
as I cannot login as root from WinSCP to this directory, I was abled only to login via Putty under root, and then I removed those two *SambaReplacement.conf.pid files.
Please note - those two files above survived the factory reset.
After that I re-enabled the entware-ng, and I was able to access my NAS from Win 11.
As well FTP now shows some shares, but not all that I expected. And my directories/shares which were under Volume1 are still not visible under FTP.
Surprisingly in Win 11 Explorer when connecting via SAMBA to the mapped drive I can see shares both directly on NAS root and under volume1. I am not sure if this supposed to work this way.
so the summary would be something like: in case of unexpected power loss / restart SAMBA might be blocked, and one need to clean manually the /opt/var/run.
There are still things I do not understand about the shares and how they appeared differently now.
Plus some file system checks found a lot of issues which were corrected.
Thank you Mijzelf for your ongoing support here and in general. If you have any other comments or ideas to investigate let me know.
Thanks!
-A
0 -
it seems there were two files blocking start of SAMBA in /opt/var/run
I mentioned that files in this post. And yes, these prevent the Entware samba from starting, after having stopped firmware samba.
Please note - those two files above survived the factory reset.
That's right. Of course the 'factory' doesn't know anything about Entware, and will not reset anything. It only disables Entware in it's entirety.
Surprisingly in Win 11 Explorer when connecting via SAMBA to the mapped
drive I can see shares both directly on NAS root and under volume1. I am
not sure if this supposed to work this way.you must clearly distinguish 'shares' and 'directories' (or 'maps' in MS lingo). A share is something which is shared by a network filesystem. A directory is a 'normal' filesystem thing. In explorer you see all shares, directly under NSA325. The subdirectories in 'Volume1' are subdirectories. not shares.
Those subdirectories happen to be shared either, but that is just a coincidence. If you 'unshare' one of the user made shares, they are still in 'Volume1'.
The 'Volume1' share is a share which spans the whole disk, and is for that reason only accessible by admin. The reason for this share is (I think) to be able to move data fast between shares. When you move a file from one subdirectory to another within the same share, it's only administrative. If you would move the same file between two shares, it will be downloaded and uploaded. The client has no way to see that both shares are in the same filesystem (or even on the same computer).
1 -
Hi Mijzelf,
thank you for your tireless work here explaining stuff and things.
One other thing which still a mystery to me: why I do not see anything in WinSCP when logged as admin under Volume1? Is it expected behavior? Or ist a symptom of something being screwed with Volume1? Why with admin FTP login I see neither other shares nor directories?
Thanks, and regards, -A
0 -
actually more than that - somehow using File Browser under admin I cannot see files and directories where I would expect them… this is weird.
0 -
What can I say? I cannot reproduce your problem, nor can I think how SambaReplacement can interfere with the firmware shares. At least not in a way that I can't reproduce it. And you seem to be alone. SambaReplacement is around for 10 years or so, and AFAIK you are the first one having this problem. Of course it's possible that no one ever bothered to use samba and FTP together.
That the web filebrowser has more or less the same problem is not strange. As it's content is dependent on the logged in user, just like FTP, it will have a similar way to produce it's output. Maybe exactly the same.
I don't know an easy way to find out what happens, only a cumbersome one, like intercepting the pure-ftpd start, and let strace generate huge logfiles, and hope the difference between running with and without SambaReplacement can be spotted.
1 -
Hi Mijzelf,
in no way I was blaming SambaReplacement or complaining about anything. You and community here do enormous job supporting ZyXEL fans. Your support and knowledge are of greatest value.
Please treat my questions and comments more of like a research or an investigation.
Regards, -A
0 -
FYI - I copy this from another thread as it is related (see
)
i did a configuration restore to the point in time before I did a factory reset via the hidden button on the rear of NAS325v2.
after that I was able to map a network share with a dedicated user as before on my Win XP laptop.
plus after configuration recovery I can see shares where expected when logging via WinSCP with FTP.
but there is more interesting fact. via FTP I see shares which were created before "Configuration Restore". But I actually created a new share after recovery called "backup" but somehow it does not appear under the root via FTP.
and super strange thing - in File Browser I see empty admin and newly created backup shares
when SMB shares on Win 11 laptop are Ok and I can see all the files expected there
This is something I cannot explain, but might be worth to look into.
-A
0 -
and one more crazy thing - somehow after configuration restore I got an error "access denied" when trying to look into syslog files. but clicking "Browse…" button works and I can see the files and directories.
this is not an ask for help, just an observation.0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 149 Nebula Ideas
- 96 Nebula Status and Incidents
- 5.7K Security
- 263 USG FLEX H Series
- 271 Security Ideas
- 1.4K Switch
- 74 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.4K Consumer Product
- 249 Service & License
- 387 News and Release
- 84 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.5K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 73 Security Highlight