File Permissions Bug in Windows - Blender ignores Windows folder permissions and fails to write in valid folders with proper permissions. #52080

Closed
opened 2017-07-16 03:47:25 +02:00 by Jerry Hobby · 17 comments

Windows 10
Blender 2.78c
hash: e92f235283

When saving files, Blender will save files to "My Documents" based on some hard coding. It will not save to other folders even if they have valid windows file/folder permissions. Further, it does not honor the redirection shortcuts as described below.

Blender should follow Windows file/folder permissions and not force it's own file rules of only using "My Documents".

Why it breaks for me:

In windows, it is possible to MOVE your "My Documents", "My Music", and other folders. You can "change location" for these standard folders. In my case, I use OneDrive. I have moved "My Documents" into my "OneDrive\My Documents" folder. This enables my documents to sync from one computer to another automatically.

Blender is only willing to save to C:\users\jerry\my documents. It will not honor my personalized location of "c:\users\jerry\onedrive\my documents".

My folders do have correct permissions for Windows apps and works perfectly for other applications. But since blender implements it's own internal restrictions on where it is willing to write files, that is causing a problem.

Others who encounter this problem are simply running blender as administrator. They never figure out that the reason they must do that is because blender is not honoring windows conventions for files and folders.

There are two parts to this bug:

  1. You should honor shortcuts and relocated "my documents" folders, etc. Windows allows things to move. Blender should respect that.

  2. Blender denies writing to folders where writing is allowed by windows because it forces usage of default "my documents" locations on the C: drive. All other folders are denied. Blender should honor the permissions systems implemented in Windows and not override them.

Windows 10 Blender 2.78c hash: e92f235283 When saving files, Blender will save files to "My Documents" based on some hard coding. It will not save to other folders even if they have valid windows file/folder permissions. Further, it does not honor the redirection shortcuts as described below. Blender should follow Windows file/folder permissions and not force it's own file rules of only using "My Documents". Why it breaks for me: In windows, it is possible to MOVE your "My Documents", "My Music", and other folders. You can "change location" for these standard folders. In my case, I use OneDrive. I have moved "My Documents" into my "OneDrive\My Documents" folder. This enables my documents to sync from one computer to another automatically. Blender is only willing to save to C:\users\jerry\my documents. It will not honor my personalized location of "c:\users\jerry\onedrive\my documents". My folders do have correct permissions for Windows apps and works perfectly for other applications. But since blender implements it's own internal restrictions on where it is willing to write files, that is causing a problem. Others who encounter this problem are simply running blender as administrator. They never figure out that the reason they must do that is because blender is not honoring windows conventions for files and folders. There are two parts to this bug: 1. You should honor shortcuts and relocated "my documents" folders, etc. Windows allows things to move. Blender should respect that. 2. Blender denies writing to folders where writing is allowed by windows because it forces usage of default "my documents" locations on the C: drive. All other folders are denied. Blender should honor the permissions systems implemented in Windows and not override them.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @JerryHobby

Added subscriber: @JerryHobby

Added subscriber: @RayMairlot

Added subscriber: @RayMairlot

Added subscriber: @matali23

Added subscriber: @matali23

First of all, when you do assumptions, you should speak more gently. Nobody should do what you say or want.
Second, Blender does respect permissions, I couldn't reproduce your bug. If I try to write to a folder I'm allowed to write in, it works, whatever folder/partition it is, if I'm not allowed it won't.
So you have to better describe your problem and speak normally.

First of all, when you do assumptions, you should speak more gently. Nobody should do what you say or want. Second, Blender does respect permissions, I couldn't reproduce your bug. If I try to write to a folder I'm allowed to write in, it works, whatever folder/partition it is, if I'm not allowed it won't. So you have to better describe your problem and speak normally.

Added subscriber: @brecht

Added subscriber: @brecht

Probably this is some issue with NTFS file junctions. What is the exact error you message get, when saving a .blend to this folder?

Probably this is some issue with NTFS file junctions. What is the exact error you message get, when saving a .blend to this folder?
Author

This is definitely a challenging problem to describe. Let me give you my step-by-step.

  • Installed blender with MSI
  • Created tiny test project
  • Tried to save it to c:\users\jerry\onedrive\myfile.blend - got error: Cannot open file @ for writing: Permission denied.
  • Tried to save it to c:\myfile.blend - got same error
  • Tried to save to c:\users\jerry\my documents\myfile.blend - success (I tried many other locations, but only this location worked.
  • Tried to save to network drives - also success.
  • I uninstalled and reinstalled - exact same behavior.
  • I posted to blender support forums and was told i need to run blender as administrator - I also saw that advice with google searches. apparently it's a common answer.
  • I modified shortcut to "run as administrator" - now I can save my files.
  • as a test - i removed the "run as administrator" check and tried again
  • saving to c:\myfile.blend created same error message.
  • tried same filename and location several times - one time it worked - 5 times it failed. The file did save once. So that's interesting.
  • tried saving to existing to c:\user\jerry\onedrive and it did save several times successfully.

The first series of tests prior to this ticket being created produced consistent failures. Now the results are intermittent. Maybe running it as administrator in between cleared up some problems. But it did fail a few times, so there is an issue.

My assumption that this is a blender issue with hot it opens and handles file permissions is because there seems to be a common suggestion to run it as administrator. This suggests other people have problems as well but they are not reporting it as a bug, they just find a work-around.

This is definitely a challenging problem to describe. Let me give you my step-by-step. - Installed blender with MSI - Created tiny test project - Tried to save it to c:\users\jerry\onedrive\myfile.blend - got error: **Cannot open file @ for writing: Permission denied.** - Tried to save it to c:\myfile.blend - got same error - Tried to save to c:\users\jerry\my documents\myfile.blend - success (I tried many other locations, but only this location worked. - Tried to save to network drives - also success. - I uninstalled and reinstalled - exact same behavior. - I posted to blender support forums and was told i need to run blender as administrator - I also saw that advice with google searches. apparently it's a common answer. - I modified shortcut to "run as administrator" - now I can save my files. - as a test - i removed the "run as administrator" check and tried again - saving to c:\myfile.blend created same error message. - tried same filename and location several times - one time it worked - 5 times it failed. The file did save once. So that's interesting. - tried saving to existing to c:\user\jerry\onedrive and it did save several times successfully. The first series of tests prior to this ticket being created produced consistent failures. Now the results are intermittent. Maybe running it as administrator in between cleared up some problems. But it did fail a few times, so there is an issue. My assumption that this is a blender issue with hot it opens and handles file permissions is because there seems to be a common suggestion to run it as administrator. This suggests other people have problems as well but they are not reporting it as a bug, they just find a work-around.
Author

In #52080#446556, @matali23 wrote:
First of all, when you do assumptions, you should speak more gently. Nobody should do what you say or want.
Second, Blender does respect permissions, I couldn't reproduce your bug. If I try to write to a folder I'm allowed to write in, it works, whatever folder/partition it is, if I'm not allowed it won't.
So you have to better describe your problem and speak normally.

Matali, I apologize for anything that sounded harsh or demanding to you. It wasn't intended that way. I was trying to describe what seemed like the problem to me. Not complaining. but I see how it came across as abrasive. I apologize for that. I reposted in a comment and described it "more gently". Please don't imagine I'm an angry and demanding person. I am not. Hopefully my bulleted list is more helpful.

> In #52080#446556, @matali23 wrote: > First of all, when you do assumptions, you should speak more gently. Nobody should do what you say or want. > Second, Blender does respect permissions, I couldn't reproduce your bug. If I try to write to a folder I'm allowed to write in, it works, whatever folder/partition it is, if I'm not allowed it won't. > So you have to better describe your problem and speak normally. Matali, I apologize for anything that sounded harsh or demanding to you. It wasn't intended that way. I was trying to describe what seemed like the problem to me. Not complaining. but I see how it came across as abrasive. I apologize for that. I reposted in a comment and described it "more gently". Please don't imagine I'm an angry and demanding person. I am not. Hopefully my bulleted list is more helpful.

Added subscriber: @mont29

Added subscriber: @mont29

Hmmm… the '@' file is a temp .blend file Blender uses to dump its binary data in, before renaming it to final file name - it avoids potentially running an existing .blend file whe you write over it.

We have another report witch seems to root to same problem (#52036) - could it be that Windows now forbids '@' in filenames? Could not find any mention of '@' char in https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx though…

Hmmm… the '@' file is a temp .blend file Blender uses to dump its binary data in, before renaming it to final file name - it avoids potentially running an existing .blend file whe you write over it. We have another report witch seems to root to same problem (#52036) - could it be that Windows now forbids '@' in filenames? Could not find any mention of '@' char in https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx though…

On the other end, since '@' file is written first, would be the first one to hit permission issue, so…

On the other end, since '@' file is written first, would be the first one to hit permission issue, so…

Added subscriber: @fablefox

Added subscriber: @fablefox

@mont29 , I think this bug(?) is quite old - back in 2012. I managed to find someone post a solution-ish for Windows 7.

https://www.youtube.com/watch?v=N5qXI5G0HlA

I don't know if the issue is with Blender or OS though...

@mont29 , I think this bug(?) is quite old - back in 2012. I managed to find someone post a solution-ish for Windows 7. https://www.youtube.com/watch?v=N5qXI5G0HlA I don't know if the issue is with Blender or OS though...

I think there are two distinct issue here. In #52036 it seems that Blender tries to use C:\ as the temporary directory. This report seems to be about NTFS junctions, which are a special type of symbol link used by Windows to move e.g. My Documents to another location.

I think there are two distinct issue here. In #52036 it seems that Blender tries to use C:\ as the temporary directory. This report seems to be about NTFS junctions, which are a special type of symbol link used by Windows to move e.g. My Documents to another location.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Bastien Montagne self-assigned this 2017-08-01 22:58:54 +02:00

Well… then we'll need to add support for NTFS junctions maybe at some point. That is a TODO though (maybe some #platform:_windows dev likes to take a go at it? added a note to our TODO list), not a bug. Thanks for the report anyway.

Well… then we'll need to add support for NTFS junctions maybe at some point. That is a TODO though (maybe some #platform:_windows dev likes to take a go at it? added a note to our [TODO list](https://wiki.blender.org/index.php/Dev:Source/Development/Todo/Install-OS)), not a bug. Thanks for the report anyway.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#52080
No description provided.