godotengine / godotengine/godot

Restrictive permissions on asset folder shows up as "invalid file" errors and creates import loops

Open
#98,548 0 comments 0 reactions 0 assignees View on GitHub
bug topic:editor topic:import
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in: v4.3.stable.mono.official [77dcf97d8]

### System information

macOS - Sonoma 14.6.1 (23G93)

### Issue description

I moved an [asset pack](https://quaternius.com/packs/stylizednaturemegakit.html) into my project folder. For some reason, the pack comes with permission 555 on the directories.

When I returned to Godot, the import entered an infinite loop. It kept triggering the import process and failing with hundreds of errors like:

```
Cannot open file from path 'res://assets/models/StylizedNatureMegaKit/Textures/Bark_DeadTree_Normal.png.import'.
editor/editor_node.cpp:1278 - Condition "!res.is_valid()" is true. Returning: ERR_CANT_OPEN
Cannot open file from path 'res://assets/models/StylizedNatureMegaKit/Textures/Leaves_GiantPine_C.png.import'.
Cannot open file from path 'res://assets/models/StylizedNatureMegaKit/Textures/Leaves_TwistedTree_C.png.import'.
Cannot open file from path 'res://assets/models/StylizedNatureMegaKit/Textures/Leaves_TwistedTree.png.import'.
Cannot open file from path 'res://assets/models/StylizedNatureMegaKit/Textures/Leaves_NormalTree_C.png.import'.
No loader found for resource: res://assets/models/StylizedNatureMegaKit/glTF/Leaves_TwistedTree_C.png (expected type: )
modules/gltf/gltf_document.cpp:3534 - Condition "err != OK" is true.
modules/gltf/gltf_document.cpp:3777 - Index image = 1 is out of bounds (p_state->images.size() = 0).
modules/gltf/gltf_document.cpp:3777 - Index image = 0 is out of bounds (p_state->images.size() = 0).
modules/gltf/gltf_document.cpp:3777 - Index image = 2 is out of bounds (p_state->images.size() = 0).
Cannot open file from path 'res://assets/models/StylizedNatureMegaKit/glTF/TwistedTree_4.gltf.import'.
```

The assets show up with a red cross in the filesystem explorer,
you get `editor/editor_node.cpp:1278 - Condition "!res.is_valid()" is true. Returning: ERR_CANT_OPEN` when you try to double-click the file.

The feedback suggests an issue with the assets, as if the files are corrupted or invalid. The first search results discuss [invalid formats](https://www.reddit.com/r/godot/comments/vgilxn/error_failed_to_open_png/).

The solution is "just" to chmod 755 the directories.

Expected:
- The import process doesn't infinite loop,
- The import process shows clear feedback like `"Permission error when creating the res://some-file.import"`.

### Steps to reproduce

`cd assets; chmod 555 ./; touch ./some-file.jpg` go back to godot.

Using the free tier of the asset pack above gives the infinite loop for some reason.

### Minimal reproduction project (MRP)

[bug-report-permissions.zip](https://github.com/user-attachments/files/17529458/bug-report-permissions.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.