Zyxel NAS542 - copied files from old NAS are inaccessible (open from NAS share)
adrian3k
Posts: 16 Freshman Member
Hi.
I have a Zyxel NAS 542 (4 bay) with 2 HDD, I've created a share folder, created a user with all access and copied old NAS files (320gb, over 400000 files) to this new share. Now I have a problem with opening files directly from NAS shared folder, when copied to local drive - all works fine. I've checked the permissions on files and folders (ssh, ls -alh) and it was okay (USER everyone rwx), created a NEW file on the same folder and checked again (ssh, ls -alh). The copied files were unable to open (cad files, project files, archives), the new file was fine.
Anyone have an idea what can be wrong?
Shares are done by drive mapping with user/password - I even used "chown USER -R *" on the copied files, still the problem exists...
#NAS_Sep_2019
I have a Zyxel NAS 542 (4 bay) with 2 HDD, I've created a share folder, created a user with all access and copied old NAS files (320gb, over 400000 files) to this new share. Now I have a problem with opening files directly from NAS shared folder, when copied to local drive - all works fine. I've checked the permissions on files and folders (ssh, ls -alh) and it was okay (USER everyone rwx), created a NEW file on the same folder and checked again (ssh, ls -alh). The copied files were unable to open (cad files, project files, archives), the new file was fine.
Anyone have an idea what can be wrong?
Shares are done by drive mapping with user/password - I even used "chown USER -R *" on the copied files, still the problem exists...
#NAS_Sep_2019
0
Best Answers
-
-
tried one more option:
chown-nobody -hR USER:everyone * from main share/ folder
have no more idea's on my own0 -
Ah sorry, missed that post. Well, after looking at the files, the most probable difference I can find is oplocks. That's a Windows way to lock files, to prevent multiple edit sessions at a time. I can imagine some editors just refuse to work if they can't get exclusive accessIn old file we have
<div>[global]</div><div><br></div><div>oplocks = yes</div>
in new file it's<div>[global]</div><div><br></div><div><div>kernel oplocks = no</div><div><br></div>level2 oplocks = no</div>
(I'm very happy that smb.conf always have simple, not confusing options)So try to edit the latter to 'yes', and restart samba.<div>/etc/init.d/samba.sh restart<br></div>
1
All Replies
-
Firmware V5.21(ABAG.2)
0 -
What happens if you copy a file to local, rename it and copy it back? Is it accessible? And if yes, what is the difference in
ls -la old_file new_file
0 -
-rwxrwxrwx 1 USER everyone 538.5K Feb 6 2019 File.dwg-rwxrwxrwx 1 USER everyone 538.5K Feb 6 2019 File test.dwg
File is still not accessible directly form NAS...
btw. using Total Commander to copy files (copy NTFS permissions is UNCHECKED)0 -
File is still not accessible directly form NAS...
Was you able to access the file when it was on the old share? Was that on the same NAS, and does it still exist? If yes, have a look in /etc/samba/smb.conf to see what the difference is between the shares.
0 -
Old NAS was on FreeNAS (old version like 9.1 or smth).
The old server is not formatted yet, but I wasn't the person that configured it.
Will try to take a look into the file. On Zyxel i should ssh to the server and change values there and it would work or do I have to edit it thru webpanel?0 -
Unfortunately editing the smb.conf isn't straight forward. The file is dynamically generated by the backend, and not all settings have a counterpart in the webinterface.Yet if you manage to find the difference, the samba manual can tell if it makes sense, and it is possible to edit smb.conf and restart samba until the next reboot or webinterface action.Depending on the exact difference it might be possible to inject it @boot time.0
-
Mijzelf I have managed to get to old server - there is no /etc/samba/smb.conf file
It was configured on CIFS (i think, not sure)
options: Local master was checked, account for guest: nobody
dont see any other things that should matter...0 -
-
OLD NAS usr/local/etc/smb.conf[share]path = /mnt/volume1/shareprintable = noveto files = /.snap/.windows/.zfs/writeable = yesbrowseable = yesinherit owner = noinherit permissions = yesvfs objects = zfsaclguest ok = yesinherit acls = Yesmap archive = Nomap readonly = nonfs4:mode = specialnfs4:acedup = mergenfs4:chown = yeszyxel /etc/samba/smb.conf[share]path = /i-data/12344321/sharefollow symlinks = yesstrict allocate = yesallocation roundup size = 0aio write size = 4096comment = "share"browseable = yesvalid users = "admin" "pc-guest" "xxx1" "XXX" "+everyone" "+XXX"guest ok = yes0
-
Removed some lines that were the same on both files (or irrelevant)OLD NAS[global]dns proxy = nostrict locking = noread raw = yeswrite raw = yesoplocks = yesmax xmit = 65535deadtime = 15display charset = LOCALEmax log size = 10syslog only = yessyslog = 1load printers = noprinting = bsdprintcap name = /dev/nulldisable spoolss = yesprivate dir = /var/etc/privategetwd cache = yesguest account = nobodymap to guest = Bad Passwordobey pam restrictions = Yes# NOTE: read smb.conf.directory name cache size = 0store dos attributes = yeshostname lookups = yestime server = yescreate mask = 0666directory mask = 0777client ntlmv2 auth = yesdos charset = CP437unix charset = UTF-8log level = 1ZYXEL NAS[global]unix charset = UTF8dos charset = ASCIIguest account = pc-guestencrypt passwords = yesmap to guest = Bad Userwrite ok = yesforce create mode = 777force directory mode = 777auth methods = guest sam_ignoredomainmax log size = 50host msdfs = yeslanman auth = yeskernel oplocks = nosocket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=2048000 SO_RCVBUF=2048000max xmit = 131072level2 oplocks = nomax smbd processes = 128printing = cupsprintcap = /etc/printcapload printers = yesuse sendfile = yespassdb backend = smbpasswdunix extensions = nowide links = yesveto files = /.grive*/.dropbox*/.THIS_IS_RECYCLE_BIN/.RBM/min receivefile size = 8192store dos attributes = yes0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 147 Nebula Ideas
- 96 Nebula Status and Incidents
- 5.7K Security
- 262 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