• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Posix shared memory - permission problems?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Posix shared memory - permission problems?


  • Subject: Re: Posix shared memory - permission problems?
  • From: "Tom O'Grady" <email@hidden>
  • Date: Thu, 20 Sep 2007 10:37:09 +0100

Thanks very much Jonas - I think that's (embarrassingly) the solution to the problem! I knew that 0x0777 was the same as 0x777 but I hadn't realised that the chmod bits were octal - when I read back from the fstat structure to 'check' the permissions, my debugger had the st_mode variable read as hexadecimal, so I was under the impression that everything was fine and the mode was indeed set to 0777.
Regards,
Tom


----- Original Message ----- From: "Jonas Maebe" <email@hidden>
To: <email@hidden>
Sent: Thursday, September 20, 2007 10:22 AM
Subject: Re: Posix shared memory - permission problems?




On 20 Sep 2007, at 11:15, Tom O'Grady wrote:

you pass "0x777" for the mode_t value; this lacks the S_IWUSR bit (0000200)--perhaps you intended to use "0777" instead? A failure due to this would match the errno value (EACCES) that you >report for the subsequent O_RDWR attempt...

this won't be the problem. that was just mistyping in my e-mail. in my code i definitely use 0x0777 so that user, group and other all have read, write and execute access.

0x0777 is the same as 0x777. The "777" from chmod is not hexadecimal notation (0x) but octal notation (0). So try using "0777" rather than "0x0777" or "0x777".



Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Posix shared memory - permission problems? (From: "Tom O'Grady" <email@hidden>)
 >Re: Posix shared memory - permission problems? (From: Terry Lambert <email@hidden>)
 >Re: Posix shared memory - permission problems? (From: "Tom O'Grady" <email@hidden>)
 >Re: Posix shared memory - permission problems? (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: Posix shared memory - permission problems?
  • Next by Date: Thread Priority?
  • Previous by thread: Re: Posix shared memory - permission problems?
  • Next by thread: Re: Posix shared memory - permission problems?
  • Index(es):
    • Date
    • Thread