# Files are not displayed by “ls” command

**URL:** <https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934>\
**Category:** Uncategorized\
**Created:** [June 17, 2025, 12:09pm UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934 "2025-06-17T12:09:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunami](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sunami](https://forum.legato.io/u/sunami)\
**Post date:** [June 17, 2025, 12:09pm UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/1 "2025-06-17T12:09:55Z")

</div>

Hi,

After storing the “setting.json” file in the “data” directory created under “/home”, the “ls -la” command did not display the “setting.json” file.The following is the result of the “dmesg” command when the “ls -la” command was executed.  
What is the status of the “data” directory and the files inside it from the result of the “dmesg” command?  
Also, what are the conditions for this state?

▼The following is the result of executing the “ls -la . /data” command. Before this problem occurred, “setting.json” was displayed. But after the problem occurred, only hidden files are displayed.  
ls -la ./data  
drwxrwx— 2 root root 904 Jan 1 09:16 .  
drwxrwx— 6 root root 416 Jan 1 09:17 ..

▼The attributes of the “data” directory after this problem occurred were unchanged from before this problem occurred.  
drwxrwx— 2 root root 904 Jan 1 09:16 data

▼The following is the result of executing the “ls -la” command with the file specified. In this case, “setting.json” is displayed.  
ls -la ./data/setting.json  
-rwxrwx— 1 root root 149 Jan 1 09:03 ./data/setting.json

▼The following is the result of the “dmesg” command.  
[614.088563] UBIFS error (ubi3:0 pid 2600): ubifs\_read\_node: bad node type (1 but expected 2)  
[614.088602] UBIFS error (ubi3:0 pid 2600): ubifs\_read\_node: bad node at LEB 252:73728, LEB mapping status 1  
[614.088617] magic 0x6101831  
[614.088629] crc 0x3308e309  
[614.088642] node\_type 1 (data node)  
[614.088656] group\_type 0 (no node group)  
[614.088670] sqnum 354287548  
[614.088681] len 1510  
[614.088699] key (11890115, data, 207)  
[614.088711] size 4096  
[614.088723] compr\_typ 1  
[614.088734] data size 1462  
[614.088744] data:  
[614.088765] 00000000: 00 63 50 53 4f 76 34 0a 4a 61 6e 20 31 36 20 31 39 3a 34 39 3a 34 00 00 00 00 00 00 00 00 00 00  
[614.088781] 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc c4 e7 c0 3c c5 e7 c0  
[614.088796] 00000040: f4 d2 e7 c0 74 7a 0b ce 5c 68 03 c0 00 00 00 00 80 74 29 cd 00 00 00 00 00 00 00 00 00 00 00 00  
[614.088811] 00000060: 00 00 00 00 00 00 00 00 00 e0 01 00 18 a0 01 00 22 00 00 00 0a 00 00 00 0d 00 00 00 00 00 00 00  
[614.088827] 00000080: 00 00 00 00 28 b5 03 00 01 00 00 00 0b 00 00 00 dc 00 00 00 00 00 00 00 00 00 00 00 20 c1 03 00  
[614.088842] 000000a0: 01 00 00 00 0c 00 00 00 db 00 00 00 00 00 00 00 00 00 00 00 18 c1 03 00 01 00 00 00 0d 00 00 00  
[614.088857] 000000c0: de 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 79 0b ce 01 00 00 00 ad 4e ad de ff ff ff ff  
[614.088872] 000000e0: ff ff ff ff 14 75 0b ce 14 75 0b ce 00 00 00 00 00 00 00 00 00 75 0b ce 01 00 00 00 ad 4e ad de  
[614.088888] 00000100: ff ff ff ff ff ff ff ff 38 75 0b ce 38 75 0b ce 00 00 00 00 02 00 00 00 10 00 00 00 00 00 00 00  
[614.088903] 00000120: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 80 f8 e8 cf 00 00 00 00 00 00 00 00  
[614.088919] 00000140: 00 d0 13 cd fc c4 e7 c0 00 00 00 00 00 00 00 00 00 00 00 00 ed 41 00 00 00 00 00 00 00 00 00 00  
[614.088935] 00000160: 00 00 00 00 00 00 00 00 0e 00 00 00 7b af 2a 23 04 01 00 00 1d 33 02 3b 04 01 00 00 1d 33 02 3b  
[614.088951] 00000180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 75 0b ce c0 75 0b ce 01 00 00 00 ad 4e ad de  
[614.088966] 000001a0: ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.088982] 000001c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff a1 00 00 00 00 00 00 00 00 00 00  
[614.088996] 000001e0: 00 00 00 00 00 00 00 00 0e 00 00 00 7b af 2a 23 0e 00 00 00 7b af 2a 23 0e 00 00 00 7b af 2a 23  
[614.089012] 00000200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 76 0b ce 40 76 0b ce 01 00 00 00 ad 4e ad de  
[614.089027] 00000220: ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089042] 00000240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 24 81 00 00 00 00 00 00 00 00 00 00  
[614.089057] 00000260: 00 00 00 00 00 00 00 00 0e 00 00 00 7b af 2a 23 0e 00 00 00 7b af 2a 23 0e 00 00 00 7b af 2a 23  
[614.089073] 00000280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 76 0b ce c0 76 0b ce 01 00 00 00 ad 4e ad de  
[614.089088] 000002a0: ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089103] 000002c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b4 81 00 00 00 00 00 00 00 00 00 00  
[614.089118] 000002e0: 00 00 00 00 00 00 00 00 10 00 00 00 fa da 7d 2e 10 00 00 00 fa da 7d 2e 10 00 00 00 fa da 7d 2e  
[614.089134] 00000300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 77 0b ce 40 77 0b ce 01 00 00 00 ad 4e ad de  
[614.089149] 00000320: ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089165] 00000340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 7e 0b ce 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089180] 00000360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089196] 00000380: ff ff ff ff 3f 00 00 00 ff ff ff ff 3f 00 00 00 ff ff ff ff 3f 00 00 00 00 00 00 00 00 00 00 00  
[614.089212] 000003a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc c4 e7 c0 3c c5 e7 c0  
[614.089227] 000003c0: f4 d2 e7 c0 f4 7c 0b ce 5c 68 03 c0 00 00 00 00 80 7c 0b ce 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089242] 000003e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089257] 00000400: ff ff ff ff 3f 00 00 00 ff ff ff ff 3f 00 00 00 ff ff ff ff 3f 00 00 00 00 00 00 00 00 00 00 00  
[614.089272] 00000420: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc c4 e7 c0 3c c5 e7 c0  
[614.089288] 00000440: f4 d2 e7 c0 74 74 0b ce 5c 68 03 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089303] 00000460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
[614.089319] 00000480: ff ff ff ff 3f 00 00 00 ff ff ff ff 3f 00 00 00 ff ff ff ff 3f 00 00 00 00 00 00 00 00 00 00 00  
[614.089334] 000004a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc c4 e7 c0 3c c5 e7 c0  
[614.089350] 000004c0: f4 d2 e7 c0 00 04 14 cd 5c 68 03 c0 00 00 00 00 00 d0 34 ce 00 00 00 00 00 00 00 00 03 00 00 00  
[614.089365] 000004e0: 00 00 00 00 17 00 00 00 00 00 00 00 80 bb 03 00 00 00 00 00 66 00 00 00 f0 72 0b ce 40 79 0b ce  
[614.089380] 00000500: 00 00 00 00 28 c3 03 00 00 00 00 00 67 00 00 00 28 79 0b ce f0 b6 ba cd 00 00 00 00 40 bd 03 00  
[614.089395] 00000520: 00 00 00 00 68 00 00 00 28 7c 26 ce 70 41 13 ce 00 00 00 00 20 cd 03 00 01 00 00 00 69 00 00 00  
[614.089411] 00000540: 08 00 00 00 00 00 00 00 5c 68 03 c0 00 00 00 00 00 71 0b ce 01 00 00 00 ad 4e ad de ff ff ff ff  
[614.089427] 00000560: ff ff ff ff 94 79 0b ce 94 79 0b ce 00 00 00 00 00 00 00 00 80 79 0b ce 01 00 00 00 ad 4e ad de  
[614.089443] 00000580: ff ff ff ff ff ff ff ff b8 79 0b ce b8 79 0b ce 00 00 00 00 02 00 00 00 10 00 00 00 00 00 00 00  
[614.089458] 000005a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 40 06  
[614.089480] CPU: 0 PID: 2600 Comm: ls Not tainted 3.18.131 #1  
[614.089552] [] (unwind\_backtrace) from [] (show\_stack+0x10/0x14)  
[614.089586] [] (show\_stack) from [] (ubifs\_read\_node+0x25c/0x338)  
[614.089617] [] (ubifs\_read\_node) from [] (ubifs\_tnc\_read\_node+0xd0/0x1f0)  
[614.089643] [] (ubifs\_tnc\_read\_node) from [] (tnc\_read\_node\_nm+0x1b8/0x1e8)  
[614.089669] [] (tnc\_read\_node\_nm) from [] (ubifs\_tnc\_next\_ent+0x22c/0x28c)  
[614.089696] [] (ubifs\_tnc\_next\_ent) from [] (ubifs\_readdir+0x224/0x4ec)  
[614.089725] [] (ubifs\_readdir) from [] (iterate\_dir+0x78/0xfc)  
[614.089753] [] (iterate\_dir) from [] (SyS\_getdents64+0x7c/0x100)  
[614.089778] [] (SyS\_getdents64) from [] (ret\_fast\_syscall+0x0/0x44)  
[614.089801] UBIFS error (ubi3:0 pid 2600): ubifs\_readdir: cannot find next direntry, error -22

Best regards

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [June 17, 2025, 12:14pm UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/2 "2025-06-17T12:14:05Z")

</div>

how about a simple text file?  
Can you display it?

---

<div class="post-metadata">

**Author:** ![sunami](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sunami](https://forum.legato.io/u/sunami)\
**Post date:** [June 23, 2025, 12:32am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/3 "2025-06-23T00:32:32Z")

</div>

Hi jyijyi,  
I was able to create a simple file and display its contents.  
However, this file was not displayed using the “ls -la” command.

▼The following is the result of writing “abcde” using “vi ./data/simple\_file” and displaying simple\_file.  
vi ./data/simple\_file  
cat ./data/simple\_file  
abcde  
ls -la ./data  
drwxrwx— 2 root root 976 Jan 1 09:05 .  
drwxrwx— 6 root root 416 Jan 1 09:17 ..

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [June 23, 2025, 1:38am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/4 "2025-06-23T01:38:58Z")

</div>

I download the following setting.json to /home/root/data folder:

> <https://github.com/antfu/vscode-settings/blob/main/.vscode/settings.json>

I don’t see such problem:

```auto
root@swi-mdm9x28-wp:~# ls -la /home/root/data/
drwxr-xr-x 2 root root 232 Jan 6 08:03 .
drwxr-xr-x 4 root root 520 Jan 6 08:03 ..
-rw-r--r-- 1 root root 18961 Jun 23 2025 settings.json

```

---

<div class="post-metadata">

**Author:** ![sunami](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sunami](https://forum.legato.io/u/sunami)\
**Post date:** [June 23, 2025, 4:33am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/5 "2025-06-23T04:33:02Z")

</div>

Is there anything that can be learned from dmseg?  
Also, are there any other logs that should be obtained?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [June 23, 2025, 6:28am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/6 "2025-06-23T06:28:56Z")

</div>

i think you need to first find a way to reproduce the issue.  
For example, is this only happening to your setting.json?  
How about above setting.json?

What if you do a cleaning of userapp partition?

> **[Swiflash -r broken with release 12 on wp77xx?](https://forum.sierrawireless.com/t/swiflash-r-broken-with-release-12-on-wp77xx/20957/2)**
>
> According to the release note of fw r12, QTI9X07-2870 is to fix userapp partition being erased which is security hole. You might also try the following without downgrading to older version: (Be careful of the mtd number, different FW might have...

---

<div class="post-metadata">

**Author:** ![sunami](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sunami](https://forum.legato.io/u/sunami)\
**Post date:** [June 23, 2025, 9:01am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/7 "2025-06-23T09:01:17Z")

</div>

I would like to find a way to reproduce this if possible, but because of the following, it is difficult to create a reproduction environment as it is expected to be a probabilistic issue.

- The setting.json file is copied only once at the time of shipment.
- In addition to setting.json, the service.json file is also copied at the time of shipment, but the same result has occurred.
- This issue occurred in one out of several thousand products equipped with Legato on the market.

As we only have one sample, I would like to try to recover this environment as a last resort.

First of all, could you tell me the content of the following message?

[614.088563] UBIFS error (ubi3:0 pid 2600): ubifs\_read\_node: bad node type (1 but expected 2)  
[614.088602] UBIFS error (ubi3:0 pid 2600): ubifs\_read\_node: bad node at LEB 252:73728, LEB mapping status 1

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [June 23, 2025, 9:02am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/8 "2025-06-23T09:02:38Z")

</div>

i guess there is some flash partition corruption  
But without reproducible steps or further testing, it is hard to conclude…

> **[\[FX30-4G LTE-M\] Wrong /etc size in ls FW14](https://forum.sierrawireless.com/t/fx30-4g-lte-m-wrong-etc-size-in-ls-fw14/25578/15)**
>
> Calling the erasing that way: flash\_erase /dev/mtd16 0 0 && reboot Seem to generate the error (but not each time), is it the case on your system? The kernel error is logged (at least) on the serial port.

> **[Reset image for FX30 Cat-M to clean overlay](https://forum.sierrawireless.com/t/reset-image-for-fx30-cat-m-to-clean-overlay/25451/10)**
>
> On the R9.1 the overlay can be erased with the reset.cwe so for now we use that. Before downgrading to 9.1, I’m currently trying to fwupdate between 2 R14 FW to test if the commands work properly.

---

<div class="post-metadata">

**Author:** ![sunami](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@sunami](https://forum.legato.io/u/sunami)\
**Post date:** [July 3, 2025, 12:56am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/9 "2025-07-03T00:56:08Z")

</div>

Since there are still devices on which the issue occurs, is there any way to approach diagnosing “flash partition corruption”?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [July 3, 2025, 1:18am UTC](https://forum.legato.io/t/files-are-not-displayed-by-ls-command/6934/10 "2025-07-03T01:18:07Z")

</div>

i have asked the AI, it gave the following suggestion:

```auto
Error Analysis
The error message indicates issues with reading nodes from the UBIFS file system:

[614.088563] UBIFS error (ubi3:0 pid 2600): ubifs_read_node: bad node type (1 but expected 2)
[614.088602] UBIFS error (ubi3:0 pid 2600): ubifs_read_node: bad node at LEB 252:73728, LEB mapping status 1
[614.088617] magic 0x6101831
[614.088629] crc 0x3308e309
[614.088642] node_type 1 (data node)
[614.088656] group_type 0 (no node group)
[614.088670] sqnum 354287548
[614.088681] len 1510
[614.088699] key (11890115, data, 207)
[614.088711] size 4096
[614.088723] compr_typ 1
[614.088734] data size 1462

Key Points from the Error Log
Bad Node Type: The node type read is 1 (data node) but expected 2 (likely a different type of node).
Bad Node Location: The error occurs at Logical Erase Block (LEB) 252, offset 73728.
Node Details: The node has a magic number 0x6101831, CRC 0x3308e309, and various other attributes.

Potential Causes
Power Failures: Sudden power cuts can corrupt the UBIFS partition, especially during write operations
Firmware Bugs: Bugs in the firmware can lead to improper handling of flash writes and cause corruption 
Hardware Issues: Problems with the NAND flash hardware, such as bad blocks or wear-out, can result in read/write errors 

Diagnostic Steps
Check for Power Failures: Ensure that the device is not experiencing sudden power cuts. Implement power-fail-safe mechanisms if necessary.
Firmware Update: Verify that the firmware is up-to-date and includes fixes for known UBIFS issues. Consider updating to the latest stable release.
Bad Block Management: Use tools like nandtest to check for bad blocks and manage them appropriately
UBIFS Recovery: Attempt to recover the UBIFS partition using tools like ubiformat and ubiattach

Example Recovery Commands

# Attach the UBI device
ubiattach /dev/ubi_ctrl -m 0

# Format the UBI device
ubiformat /dev/mtd0 -y

# Create a new UBI volume
ubimkvol /dev/ubi0 -N rootfs -s 512MiB

# Mount the UBIFS file system
mount -t ubifs ubi0:rootfs /mnt/flash

```
