Skip navigation.
 
mlPermissions in an app bundle
FROM : Nir Soffer
DATE : Wed Jul 05 11:42:26 2006

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. I currently use Xcode 
ALTERNATE_PERMISSIONS_FILES to make the template directory user 
writable, which solve this problem. The app bundle is not writable 
except the template directory.

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.

Another solution I considered is packing the template in an archive, 
and unpacking the archive instead of the copying. Is there an easier 
way to unpack an archive than using tar in a sub process?


Best Regards,

Nir Soffer

Related mailsAuthorDate
mlPermissions in an app bundle Nir Soffer Jul 5, 11:42
mlRe: Permissions in an app bundle Andrew Farmer Jul 5, 11:54
mlRe: Permissions in an app bundle Nir Soffer Jul 5, 14:36
mlRe: Permissions in an app bundle Tage Borg Jul 5, 16:12
mlRe: Permissions in an app bundle Nir Soffer Jul 5, 17:13
mlRe: Permissions in an app bundle Sherm Pendley Jul 5, 19:15
mlRe: Permissions in an app bundle Julio Cesar Silva… Jul 5, 19:21
mlRe: Permissions in an app bundle Nir Soffer Jul 5, 20:04
mlRe: Permissions in an app bundle Shawn Erickson Jul 5, 20:26
mlRe: Permissions in an app bundle Nir Soffer Jul 5, 20:39
mlRe: Permissions in an app bundle Uli Kusterer Jul 6, 12:40