Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Thrash911

macrumors 6502
Original poster
Sep 14, 2006
297
4
Jutland, Denmark
Hello dear OS X users, :)

I have a late 2012 27" iMac, running the latest Mountain Lion (10.8.3).

I have set a Text Document to open at boot. I did it under Login Items in Preferences. But whenever I boot my machine, instead of the document being opened, I get a permission error. Just so there are no misunderstandings, here is the exact error message:

"The document "docname.txt" could not be opened. You don't have permission."

What..?? :confused: In the documents Info, I can see the permissions. I, the user, can Read & Write. "Staff" and "Everyone" can only read (which would include opening it, yes?). Very normal, right?

I figured, that MAYBE it's the "system" that opens the file at boot, but even that should be possible according to permissions.

EDIT: Besides this, I am able to work with the document as normal.

Have anyone experienced this? What can I do? A thousand thanks in advance, good people. :)
 
Last edited:

Platskies

macrumors member
Jul 24, 2012
52
44
NSW, Australia
Didn't know you could even add documents to your login items. I tried it with a .txt file, and I got the same thing - definitely seems like a bug. Looking at Console.app, it seems like it's related to App Sandbox.

Not really sure what you could do (apart from perhaps manually opening the file through putting the item in the Dock). Maybe give http://apple.com/feedback/macosx.html a go?
 

Thrash911

macrumors 6502
Original poster
Sep 14, 2006
297
4
Jutland, Denmark
Thanks for your reply, Platskies.

It's at least good to know, that I am not the only one. Thanks for your idea. I have now submitted a detailed bug report.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,751
8,423
A sea of green
Try making a simple Automator application. It should contain one step: tell TextEdit.app to open the document you want.

Since the Automator application is an application, rather than a document, it should be legal to run it from Login Items.

If it works, an AppleScript application that does the same thing should also work.
 

Thrash911

macrumors 6502
Original poster
Sep 14, 2006
297
4
Jutland, Denmark
Found a pattern!

I have found out, that the text file I want to open at login, needs to be in a path where "system" (root) has folder access all the way to the file. Fx. if I place the text file in the Applications folder (where "system" has read/write access), it opens every time!

Yes, that's great.. It's just, that it doesn't make sense to me..

1.
"System" can access everything. It shouldn't need any special permissions at all! Right?

2.
Why is "system" opening my text file? I set it to open under my user's Login Items. So, it should be my user that opens it. Right?

3.
This is a head-scratcher.. SOMETIMES it opens fine - even if the file is located where "system" does NOT have permission. This happens, like, 1 out of 10 times. :confused:

I don't expect any of you to come up with a solution to this, because there probably isn't one. It must be some weird bug.. If not a bug, I sure don't understand how this is supposed to work.

No, that text I'm trying to open, is not that important to me. But I have become a bit obsessed with this issue, and I'm running out of ideas fast..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.