What's new

RT-AC68U SAMBA share - deleted/damaged files after move operation

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I haven't seen the I/O error you mention. But I did run into the text editing issue yesterday. I was editing some .m3u playlists using windows Textpad. Even though it says it is saved the changes are not saved. I am using NTFS format. The firmware is Merlin's 36 beta1. But like you said it might be a problem in the later versions of the base Asus code.

Thanks alot for the info.

I did some extra troubleshooting with my two test files (a txt and an ods document) - it seems there was a change in the samba share configuration from Asus firmware version 205 to 339. The semi corrupted txt file can be edited as expected in firmware version 205, but some of the changes are not saved in firmware version 339. In my test spreadsheet if I delete some sheets and save the document in firmware version 205 the changes are saved correctly and can be opened without any error. In firmware version 339 in some occasions I receive the I/O error, but everytime after the save operation, when I try to open the document again the file is corrupted and should be repaired. I can probably clean the files for any confidential information and provide them for anyone who can troubleshoot further (Asusnet or RMerlin). I am using LibreOffice version 4.1 and Windows Notepad.

I have tested with ext4 formatted drive as well with the same behavior. I use Gparted Live USB when formatting the drive. I don't have any issues when copying or moving files only when editing files.
 
I have found a way to re-produce the issue with a simple txt file in a Windows environment and with Notepad.

1. Create a new txt-file "test.txt" (via right click)

2. Open the file and add the following lines:
test1
test2
test3

3. Save the file and close Notepad

4. Open the file and delete all content in the file

5. Save and close the file - "Date modified" shows that the file has been modified, but file size hasn't changed

6. Open the file again and you will see the content is the same

And strange things happens if you do the following
7. In the same file add the following lines in the top before the other lines:
asfd
asdf
asdf

8. Save and close the file

9. Open the file again and delete the two lines in the top -> Save -> Close

10. Open the file again and see the magic - I end up with this:
asdf
test1
test2
test3test2
test3

This behaviour is for me the same no matter if the partition of the attached usb device is formatted in ext4, ext3, ext2, ntfs or fat32.
 
I have found a way to re-produce the issue with a simple txt file in a Windows environment and with Notepad.

1. Create a new txt-file "test.txt" (via right click)

2. Open the file and add the following lines:
test1
test2
test3

3. Save the file and close Notepad

4. Open the file and delete all content in the file

5. Save and close the file - "Date modified" shows that the file has been modified, but file size hasn't changed

6. Open the file again and you will see the content is the same

And strange things happens if you do the following
7. In the same file add the following lines in the top before the other lines:
asfd
asdf
asdf

8. Save and close the file

9. Open the file again and delete the two lines in the top -> Save -> Close

10. Open the file again and see the magic - I end up with this:
asdf
test1
test2
test3test2
test3

This behaviour is for me the same no matter if the partition of the attached usb device is formatted in ext4, ext3, ext2, ntfs or fat32.

What you describe in the end is what I also saw. You can see that the problem is that when the file is edited the end-of-file marker is not getting moved to the new end-of-file. The data gets edited and saved. But the end-of-file marker remains where it was. So you see all the old data. But it looks like they are moving the end-of-file marker correctly if you edit the file to make the data longer.
 
I can't reproduce the problem here on an AC68U running 501, tested both ext3 and NTFS disks.

If it's an NTFS specific issue, it's possible that it was resolved in the Paragon driver update used in 501.
 
I can't reproduce the problem here on an AC68U running 501, tested both ext3 and NTFS disks.

If it's an NTFS specific issue, it's possible that it was resolved in the Paragon driver update used in 501.

Thanks Merlin for the update. I saw the problem on AC68R with 36 beta1. I will refrain from editing any files till I go to the fixed up 37 release.
 
I can't reproduce the problem here on an AC68U running 501, tested both ext3 and NTFS disks.

If it's an NTFS specific issue, it's possible that it was resolved in the Paragon driver update used in 501.

Thanks for testing Merlin. Strange - I can easily reproduce the issue with any disk formatted in either ext2/3/4, NTFS or FAT32 with any firmware except for version 205 - firmware version 501 is having the issue as well for me. I have performed a Restore to factory settings via the UI after each firmware upgrade. I have tested from Windows XP 32bit and Windows 7 64bit.

Has anyone else besides MTrains and me experienced the issue?

MTrains - I am looking forward to your feedback when upgrading to Merlins future 37 release if it solves your issue.
 
Thanks Merlin for the update. I saw the problem on AC68R with 36 beta1. I will refrain from editing any files till I go to the fixed up 37 release.

Out of curiosity, can you try with the 374.37 release? That's what I was running here when I did my test.
 
Out of curiosity, can you try with the 374.37 release? That's what I was running here when I did my test.

I tried it with 374.37 on AC68R and it still fails. I tried it with Notepad on both a Windows 8.1 system and a Windows 7 system. What I noticed was that sometimes when you delete one or two characters out of a file and save it everything looks fine. But if you delete a larger number of characters and save you start seeing characters at the end of the file that shouldn't be there. If you just replace some text with new text or if you add more text to the file everything looks fine.
 
I tried it with 374.37 on AC68R and it still fails. I tried it with Notepad on both a Windows 8.1 system and a Windows 7 system. What I noticed was that sometimes when you delete one or two characters out of a file and save it everything looks fine. But if you delete a larger number of characters and save you start seeing characters at the end of the file that shouldn't be there. If you just replace some text with new text or if you add more text to the file everything looks fine.

I wonder if it could be your security software interfering. I use Norton Antivirus 2014 here.

Could also depend on the disk itself. Some disks have larger caches, it might be a cache flushing issue.
 
I wonder if it could be your security software interfering. I use Norton Antivirus 2014 here.

Could also depend on the disk itself. Some disks have larger caches, it might be a cache flushing issue.

I use AVG antivirus. I can stop it and try editing the file. I doubt that it will help.

Cache flushing issue is a possibility. Don't know how I can confirm or rule it out. The disk I am using is a Western Digital My Book 3TB with two (2TB and 1TB) NTFS partitions. In your tests where you using USB 3 or USB 2? Don't know whether that will make a difference.
 
I wonder if it could be your security software interfering. I use Norton Antivirus 2014 here.

Could also depend on the disk itself. Some disks have larger caches, it might be a cache flushing issue.

Thanks MTrains for testing and thanks for the input Merlin.

I use AVG Antivirus Free 2014 on my Windows XP 32 bit.
And Microsoft System Center 2012 Endpoint Protection on my Windows 7 64bit.

I have previously tested on the following USB disks attached to my AC68U (HW ver A1):
Seagate Backup Plus (NTFS)
WD My Passport (tested with NTFS and ext3)
Kingston Data Traveler 2.0 USB Flash drive (ext4, ext3, ext2, NTFS, FAT32)

I have used Gparted Live USB and Gparted via Ubuntu (Virtualbox) to format in ext4/3/2. I have used Windows to format in NTFS.

I have tested with the following firmware versions:
Asus stock: 205 (ok)
Asus: 339 (not ok)
Asus: 454 (not ok)
Asus: 501 (not ok)
RMerlin: 35_4 (not ok)

I have tested USB 2.0 and 3.0 ports in various combinations. What I find odd is that it is working fine on the Asus stock firmware (205) but from version 339 and forward there seems to be an issue for some people.

I have also contacted Asusnet via PM with a link to this thread.
 
I use AVG antivirus. I can stop it and try editing the file. I doubt that it will help.

Cache flushing issue is a possibility. Don't know how I can confirm or rule it out. The disk I am using is a Western Digital My Book 3TB with two (2TB and 1TB) NTFS partitions. In your tests where you using USB 3 or USB 2? Don't know whether that will make a difference.

I tried stopping the AVG Antivirus and Windows Firewall on my XP machine - it didn't help.
 
I use AVG antivirus. I can stop it and try editing the file. I doubt that it will help.

Cache flushing issue is a possibility. Don't know how I can confirm or rule it out. The disk I am using is a Western Digital My Book 3TB with two (2TB and 1TB) NTFS partitions. In your tests where you using USB 3 or USB 2? Don't know whether that will make a difference.

Try the following:

1) Create the file
2) Run this over SSH:
Code:
sync && sync && sync
3) Modify the file
4) Re-run the sync commands
5) Reopen the file, and see if it's still garbled.

What sync does is it forces the Linux kernel to flush out its caches. It shouldn't be necessary unless you were about to unmount the disk, but I'm still curious to see if flushing the kernel buffers help in any way.

My tests were done with a Kingston Datatraveler 410 flash drive (this is a high-speed USB 2.0 flash drive), connected to the USB2 port.
 
Try the following:

1) Create the file
2) Run this over SSH:
Code:
sync && sync && sync
3) Modify the file
4) Re-run the sync commands
5) Reopen the file, and see if it's still garbled.

What sync does is it forces the Linux kernel to flush out its caches. It shouldn't be necessary unless you were about to unmount the disk, but I'm still curious to see if flushing the kernel buffers help in any way.

My tests were done with a Kingston Datatraveler 410 flash drive (this is a high-speed USB 2.0 flash drive), connected to the USB2 port.

Can I run that command from the 'Run Command' window in the router web UI or do I need to execute it from a separate SSH/Telnet client?
 
Can I run that command from the 'Run Command' window in the router web UI or do I need to execute it from a separate SSH/Telnet client?

The Run Cmd page would be fine, yes.
 
Try the following:

1) Create the file
2) Run this over SSH:
Code:
sync && sync && sync
3) Modify the file
4) Re-run the sync commands
5) Reopen the file, and see if it's still garbled.

What sync does is it forces the Linux kernel to flush out its caches. It shouldn't be necessary unless you were about to unmount the disk, but I'm still curious to see if flushing the kernel buffers help in any way.

My tests were done with a Kingston Datatraveler 410 flash drive (this is a high-speed USB 2.0 flash drive), connected to the USB2 port.

Flushing the kernel buffers like you described did not fix the problem. I tried this on the AC68R running 374.37_2.
 
Still an issue with firmware version 3.0.0.4.374_583.

The "sync && sync && sync" command did unfortunately not work for me either.

Another strange thing happened today. I was transferring some pictures from a pc to the attached USB device on the router. At the same time I started wathing a movie on my WDTV Live (streaming from the same attached USB device on the AC68U). The content of the first picture was then copied to the content of the subtitle file (srt) for the movie - the subtitle file kept the same name, so the subtitle file was corrupt. When I changed the extension of the subtitle file to jpg I could open it as picture - and indeed it was the first file in my copy job. Very strange.

I am using "Share with account" - the copy job was performed with one account and the WDTV streaming accessed the AC68U with another account.

Are there any logs that might be useful for troubleshooting?
 
Have you always used "share with account"?

Check out Merlin's security/bug patch for samba port 445 on ac68 and ac56 in link below.

I used to have a NAS that was exposed to the WAN, and I had all kinds of problems, as hackers/bots would fill up a buffer trying to log in. Had to reboot it all the time.

Probably wouldn't hurt to do a port scan.

http://forums.smallnetbuilder.com/showthread.php?t=14660&page=5
 
Last edited:
Yes - I have always used "Share with account" but I have also tested without. But thanks alot for the info - I have disabled Samba sharing for the moment. It was indeed accessible from WAN. Eventhough the shares were password protected I didn't trust the security completely - better safe than sorry. I will await an updated version of the firmware and see if that solves my issue.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top