FROM : Nir Soffer
DATE : Wed Jul 05 14:36:52 2006
On 05/07/2006, at 12:54, Andrew Farmer wrote:
> On 05 Jul 06, at 02:42, Nir Soffer wrote:
>> I pack a directory structure in my app bundle, which used to
>> create new "documents" by copying the a template directory and
>> adding content. I prefer to have the directory in the bundle and
>> not in application support folder, to allow drag and drop install.
>>
>> Xcode is chmoding the app bundle using a-w, which make my new
>> documents not writable by the user.
>
> This is correct behavior. (Although you probably mean "go-w" -
> XCode doesn't appear to apply u-w.) Application bundles should
> never be writable, anywhere.
It is exactly a-w, a+rX.
>
>> I wonder if this solution is good enough, or I should instead
>> change the permissions after copying the template, which require
>> little more code. For example, enumerate the new document
>> directory and change the permission for all files using absolute
>> modes (e.g. 0755). It seems really too much work compared to
>> single chmod o+w call.
>
> That shouldn't be necessary. After the template is copied, it
> should fall under the ownership of the user executing the application.
The ownership is fine, but it does help when you own a directory but
can't write into it (see above)
Best Regards,
Nir Soffer
DATE : Wed Jul 05 14:36:52 2006
On 05/07/2006, at 12:54, Andrew Farmer wrote:
> On 05 Jul 06, at 02:42, Nir Soffer wrote:
>> I pack a directory structure in my app bundle, which used to
>> create new "documents" by copying the a template directory and
>> adding content. I prefer to have the directory in the bundle and
>> not in application support folder, to allow drag and drop install.
>>
>> Xcode is chmoding the app bundle using a-w, which make my new
>> documents not writable by the user.
>
> This is correct behavior. (Although you probably mean "go-w" -
> XCode doesn't appear to apply u-w.) Application bundles should
> never be writable, anywhere.
It is exactly a-w, a+rX.
>
>> I wonder if this solution is good enough, or I should instead
>> change the permissions after copying the template, which require
>> little more code. For example, enumerate the new document
>> directory and change the permission for all files using absolute
>> modes (e.g. 0755). It seems really too much work compared to
>> single chmod o+w call.
>
> That shouldn't be necessary. After the template is copied, it
> should fall under the ownership of the user executing the application.
The ownership is fine, but it does help when you own a directory but
can't write into it (see above)
Best Regards,
Nir Soffer
| Related mails | Author | Date |
|---|---|---|
| Nir Soffer | Jul 5, 11:42 | |
| Andrew Farmer | Jul 5, 11:54 | |
| Nir Soffer | Jul 5, 14:36 | |
| Tage Borg | Jul 5, 16:12 | |
| Nir Soffer | Jul 5, 17:13 | |
| Sherm Pendley | Jul 5, 19:15 | |
| Julio Cesar Silva… | Jul 5, 19:21 | |
| Nir Soffer | Jul 5, 20:04 | |
| Shawn Erickson | Jul 5, 20:26 | |
| Nir Soffer | Jul 5, 20:39 | |
| Uli Kusterer | Jul 6, 12:40 |






Cocoa mail archive

