Personal computing discussed

Moderators: renee, Flying Fox, Ryu Connor

 
nanoflower
Gerbil Team Leader
Topic Author
Posts: 281
Joined: Wed Mar 04, 2009 1:10 pm

Can't write to file in Win8

Thu Jan 24, 2013 2:29 pm

I'm running into another Win8 behavioral difference which I think may be due to the UAC/ACL that wasn't there in WinXP. I have a few programs like Mirc that write data out. Unfortunately Win8 isn't letting them write to any of their files unless I run them as administrator. With Mirc I have it installed in C:/Mirc and the directory it is writing to is C:/mirc/logs so I avoid any issues with the Program Files directory that I've heard about. I checked the status of the directory and files and they show up as being Read Only (a black square instead of the check mark (what is the difference?)) so I tried changing them to not be Read Only. The change doesn't stick. So something in Win8 is forcing them to be protected even though they aren't part of the OS or the Program Files.

Can anyone provide me a pointer on what to change so that I won't have this issue? I suspect it's something simple but I haven't been able to figure it out after playing around with this for over an hour.

Thanks for any help.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Can't write to file in Win8

Thu Jan 24, 2013 2:33 pm

Have you tried changing ownership of the folders/files to the user that is running it?
Nostalgia isn't what it used to be.
 
Flying Fox
Gerbil God
Posts: 25690
Joined: Mon May 24, 2004 2:19 am
Contact:

Re: Can't write to file in Win8

Thu Jan 24, 2013 2:43 pm

The safest place is under your user profile, %USERPROFILE%, or anything other than your %SystemDrive% (usually C:).
The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
 
cphite
Graphmaster Gerbil
Posts: 1202
Joined: Thu Apr 29, 2010 9:28 am

Re: Can't write to file in Win8

Thu Jan 24, 2013 2:56 pm

nanoflower wrote:
I'm running into another Win8 behavioral difference which I think may be due to the UAC/ACL that wasn't there in WinXP. I have a few programs like Mirc that write data out. Unfortunately Win8 isn't letting them write to any of their files unless I run them as administrator. With Mirc I have it installed in C:/Mirc and the directory it is writing to is C:/mirc/logs so I avoid any issues with the Program Files directory that I've heard about. I checked the status of the directory and files and they show up as being Read Only (a black square instead of the check mark (what is the difference?)) so I tried changing them to not be Read Only. The change doesn't stick. So something in Win8 is forcing them to be protected even though they aren't part of the OS or the Program Files.

Can anyone provide me a pointer on what to change so that I won't have this issue? I suspect it's something simple but I haven't been able to figure it out after playing around with this for over an hour.

Thanks for any help.


Try taking ownership of the folders in question and then changing the security on them. Be sure NOT to do this to any folders the OS might be using.
 
Ryu Connor
Global Moderator
Posts: 4369
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Can't write to file in Win8

Thu Jan 24, 2013 3:03 pm

Ownership isn't the issue (or at least not one that needs to be mucked with).

He simply needs to give the Users group Modify rights on the mIRC folder.

Standard Users don't have write permissions for the root of the drive.

Right click the C:\mIRC folder
Select the Security tab
Left click Advanced
Left click Disable inheritance
Left click "Convert inherited permissions into explicit permissions on this object"
Left click Users in "Permission entries:" to highlight that group
Left click Edit
Left click Modify
Confirm that the "Type:" drop down box says Allow
Confirm that the "Applies to:" drop down box says "This folder, subfolder, and files"
Left click the empty checkbox at the bottom that says "Replace all child object permissions entries with inheritable permission entries from this object"
Left click OK
Left click Yes
Left click OK

mIRC will now run without Admin and can write to the disk

All this existed in Windows XP. For bad reasons it was never exposed.
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
nanoflower
Gerbil Team Leader
Topic Author
Posts: 281
Joined: Wed Mar 04, 2009 1:10 pm

Re: Can't write to file in Win8

Thu Jan 24, 2013 4:29 pm

Ryu, I think you are on the right track but it isn't working. When I click OK I get an Error Applying Security with the message "Failed to enumerate objects in the container. Access is denied." for each file in the directory.

Part of the failure may be because I can't follow your instructions. I can bring up the advanced security Settings for mIRC but I don't see an option to Convert inherited permissions into explicit permissions on this object. So I can modify the permission list but it won't let me apply changed permissions to the files.
I knew there was a reason I stayed away from ACLs all these years. ;)
 
Ryu Connor
Global Moderator
Posts: 4369
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Can't write to file in Win8

Thu Jan 24, 2013 6:34 pm

That convert option should appear right after you click disable inheritance. It has to appear at that point otherwise the system wouldn't know how to deal with the ACL.
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
nanoflower
Gerbil Team Leader
Topic Author
Posts: 281
Joined: Wed Mar 04, 2009 1:10 pm

Re: Can't write to file in Win8

Thu Jan 24, 2013 7:15 pm

Ah.. Well there's part of the issue. I never clicked on Disable Inheritance because it is already disabled. I don't suppose clicking Enable Inheritance and then Apply just gets me the same error messages about an Error in Applying Security.
 
Ryu Connor
Global Moderator
Posts: 4369
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Can't write to file in Win8

Thu Jan 24, 2013 7:30 pm

Post up a screenshot of the Advanced Security dialog if you would.
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
Flying Fox
Gerbil God
Posts: 25690
Joined: Mon May 24, 2004 2:19 am
Contact:

Re: Can't write to file in Win8

Thu Jan 24, 2013 7:37 pm

Why not just move the program to somewhere under %USERPROFILE%?
The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
 
Ryu Connor
Global Moderator
Posts: 4369
Joined: Thu Dec 27, 2001 7:00 pm
Location: Marietta, GA
Contact:

Re: Can't write to file in Win8

Thu Jan 24, 2013 8:01 pm

Probably an easier solution at this point if he's willing to fix the application shortcuts.

Copy though, not move. ;)
All of my written content here on TR does not represent or reflect the views of my employer or any reasonable human being. All content and actions are my own.
 
nanoflower
Gerbil Team Leader
Topic Author
Posts: 281
Joined: Wed Mar 04, 2009 1:10 pm

Re: Can't write to file in Win8

Fri Jan 25, 2013 11:08 pm

Unfortunately there appear to be some hardcoded links in parts of the application. I'll have to check and see if I can modify them. I did try moving the directory (which is how I found out about the hardcoded portions) and found out that the special attributes remain even when copied elsewhere.

Thanks for the suggestions.
 
Flying Fox
Gerbil God
Posts: 25690
Joined: Mon May 24, 2004 2:19 am
Contact:

Re: Can't write to file in Win8

Fri Jan 25, 2013 11:31 pm

The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
 
MadManOriginal
Gerbil Jedi
Posts: 1533
Joined: Wed Jan 30, 2002 7:00 pm
Location: In my head...

Re: Can't write to file in Win8

Sat Jan 26, 2013 2:57 am

Are you using the latest mirc v7.29? It claims to be compatible with Windows 8.

Also, this isn't 1989. Don't go installing programs to the root directory, period. Windows XP may have worked fine that way, but if MS made it correctly it wouldn't have. Add/remove programs should be used for any programs possible, for those that don't go through the add/remove control panel, at least put them in the 'Programs' or 'Programs (x86)' folders.
 
SuperSpy
Minister of Gerbil Affairs
Posts: 2403
Joined: Thu Sep 12, 2002 9:34 pm
Location: TR Forums

Re: Can't write to file in Win8

Mon Jan 28, 2013 11:27 am

When you install mirc with it's default settings in the default location (\Program Files (x86)) it will use your roaming profile directory without issue. This has been true since at least version 7.

EDIT: Did you install with the 'portable application' option checked?
Desktop: i7-4790K @4.8 GHz | 32 GB | EVGA Gefore 1060 | Windows 10 x64
Laptop: MacBook Pro 2017 2.9GHz | 16 GB | Radeon Pro 560

Who is online

Users browsing this forum: Google [Bot] and 1 guest
GZIP: On