Jim:

You are right about the tilde in the path name. After I sent the E-Mail and 
noticed it.
What I wrote on startup is that if these directories are not there I create 
them, and use chmod to change the permissions to 666. Then I do the same for my 
three types of log files when I first create them.

Checking with terminal shows that the files didn’t change their permissions.
Yet if I change the permissions in Terminal they are done.

If you say it should work, then I will go back to trying it again, and 
reviewing every character I put in (again)…

Thanks for taking a review of my message and your comments.

BTW: I did get my application code signed finally (with help from Tim Penner). 
Two problems were that there were artifacts in the 4D Volume Desktop.app, and I 
had the wrong type of Apple Certificate. 

In some ways it was good I had so many problems my first time out. I got to 
learn Terminal much better, and learned to trouble shoot signing. After I get 
my notes done, I will be much better prepared for problems.

Thanks again

Jody


> On Oct 10, 2018, at 11:29 AM, Jim Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> On Oct 9, 2018, at 8:50 AM, Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
>> 
>> I love writing logs to the local computer while it is running. These log 
>> files are for the programmers to know what is occurring on the computer. 
>> Typically these logs are turned off when there are no problems in the 
>> application. They are used extensively when an application is first handed 
>> to the users in Alpha or beta form. This way we know much better where the 
>> problems are, often being able to fix the issue before they even report it 
>> to us. These files do not contain sensitive data.
>> 
>> Last week I decided I should actually test this out with switching computer 
>> users. 
>> 
>> On the MacOS we have been writing this information we write to the Shared 
>> folder. The pathname would be:
>> 
>> ~/Users/Shared/ApplicationName/Logs/LogFileName.txt
> 
> This is probably just an artifact of writing the email, but you should remove 
> the tilde in front of the path. When you convert from posix path, the tilde 
> will cause the path to become: 
> 
> /Users/<current_user>/Users/Shared/ApplicationName/Logs/LogFileName.txt
> 
> 
>> This has been working great when I am signed in as myself, or if the 
>> computer user does not changed. 
>> A quick check in Terminal shows me the directories and files are created, 
>> and I can write to them as needed.
>> -rw-r—r—
>> Or in Octal format 644
>> 
>> This is fine for the currently signed in user, but not for other users.
>> 
>> Not a problem I am thinking, I will just call terminal from within 4D at 
>> startup and use the chmod command to change the permissions of the folders 
>> and files if they are not read write for all users.
>> 
>> I suspect I am doing something stupid because it is not working.
> 
> Assuming you are actually putting the files in /Users/Shared/
> 
> 1. You have to change permissions for the directories you created too.
> 2. You can only change permissions if you are the user who created those 
> directories/files.
> 
> So if you run chmod when you create the files/directories, it should work 
> fine. If you’re running chmod at startup when logging in as another user, it 
> won’t work.
> 
> Jim Crate
> 

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to