Can't write to file in Win8

Monopoly money comes in many flavors: 7, Vista, XP, 2K, ME, 98, etc.

Moderators: Flying Fox, Ryu Connor

Can't write to file in Win8

Postposted on Thu Jan 24, 2013 1: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.
nanoflower
Gerbil First Class
 
Posts: 146
Joined: Wed Mar 04, 2009 12:10 pm

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 1:33 pm

Have you tried changing ownership of the folders/files to the user that is running it?
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 36905
Joined: Tue Aug 20, 2002 9:51 pm
Location: Somewhere, having a beer

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 1:43 pm

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

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
Flying Fox
Gerbil God
 
Posts: 24141
Joined: Mon May 24, 2004 1:19 am

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 1: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.
cphite
Gerbil Elite
 
Posts: 518
Joined: Thu Apr 29, 2010 8:28 am

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 2: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.
"Welcome back my friends to the show that never ends. We're so glad you could attend. Come inside! Come inside!"
Ryu Connor
Global Moderator
Gold subscriber
 
 
Posts: 3450
Joined: Thu Dec 27, 2001 6:00 pm
Location: Marietta, GA

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 3: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. ;)
nanoflower
Gerbil First Class
 
Posts: 146
Joined: Wed Mar 04, 2009 12:10 pm

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 5: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.
"Welcome back my friends to the show that never ends. We're so glad you could attend. Come inside! Come inside!"
Ryu Connor
Global Moderator
Gold subscriber
 
 
Posts: 3450
Joined: Thu Dec 27, 2001 6:00 pm
Location: Marietta, GA

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 6: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.
nanoflower
Gerbil First Class
 
Posts: 146
Joined: Wed Mar 04, 2009 12:10 pm

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 6:30 pm

Post up a screenshot of the Advanced Security dialog if you would.
"Welcome back my friends to the show that never ends. We're so glad you could attend. Come inside! Come inside!"
Ryu Connor
Global Moderator
Gold subscriber
 
 
Posts: 3450
Joined: Thu Dec 27, 2001 6:00 pm
Location: Marietta, GA

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 6:37 pm

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

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
Flying Fox
Gerbil God
 
Posts: 24141
Joined: Mon May 24, 2004 1:19 am

Re: Can't write to file in Win8

Postposted on Thu Jan 24, 2013 7:01 pm

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

Copy though, not move. ;)
"Welcome back my friends to the show that never ends. We're so glad you could attend. Come inside! Come inside!"
Ryu Connor
Global Moderator
Gold subscriber
 
 
Posts: 3450
Joined: Thu Dec 27, 2001 6:00 pm
Location: Marietta, GA

Re: Can't write to file in Win8

Postposted on Fri Jan 25, 2013 10: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.
nanoflower
Gerbil First Class
 
Posts: 146
Joined: Wed Mar 04, 2009 12:10 pm

Re: Can't write to file in Win8

Postposted on Fri Jan 25, 2013 10:31 pm

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

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
Flying Fox
Gerbil God
 
Posts: 24141
Joined: Mon May 24, 2004 1:19 am

Re: Can't write to file in Win8

Postposted on Sat Jan 26, 2013 1: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.
MadManOriginal
Graphmaster Gerbil
 
Posts: 1364
Joined: Wed Jan 30, 2002 6:00 pm
Location: In my head...

Re: Can't write to file in Win8

Postposted on Mon Jan 28, 2013 10: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: FX-8350 | 32 GB | XFX Radeon 6950 | Windows 7 x64
Laptop: i7 740QM | 12 GB | Mobility Radeon 5850 | Windows 8.1 x64
SuperSpy
Graphmaster Gerbil
Gold subscriber
 
 
Posts: 1496
Joined: Thu Sep 12, 2002 8:34 pm
Location: TR Forums


Return to Windows

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests