Re: hdiutil -create needs sudo for creating disk images?
Re: hdiutil -create needs sudo for creating disk images?
- Subject: Re: hdiutil -create needs sudo for creating disk images?
- From: Izidor Jerebic <email@hidden>
- Date: Thu, 13 Nov 2003 20:58:58 +0100
Well, it turns out that the problem was in file ownership flags, but a
strange one - if I copy the built product (via 'cp' or 'gnutar'), I can
package the resulting product with "hdiutil create -srcfolder ...".
The only difference (as I can find) is in the owner group setting of
the files, which is 'wheel' in files created by Xcode. Now where this
comes from, I do not know, but it seems it is a problem, probably
because 'hdiutil' cannot set the owner group to wheel on copied
files....
But where can I change this setting and why is it set as it is?
In Xcode I can see these Deployment buildstyle settings: Install owner
= "NO", Install group = "" (empty), Install mode flag = "ugo-w,o+rX".
What should I do to make all tools feel allright?
izidor
On Nov 13, 2003, at 8:01 PM, Clark Cox wrote:
The line in my script is:
hdiutil create -ov -srcfolder <source> -volname <volumename>
<imagename>
On Nov 13, 2003, at 13:52, Izidor Jerebic wrote:
Well, this is the trace of Terminal session:
% hdiutil create -srcfolder /tmp/dPage.dst dPage.dmg
Initializing...
Creating...
Finishing...
hdiutil: create failed - Operation not permitted
But the same image (exactly the same source and destination folders,
same current directory) gets created by a longwinded script executed
within Xcode which manually creates DMG, mounts, unmounts, copies
files, recompresses, etc...
So yes, I have permissions to read from the source folder and
permissions to write in the destination folder (and I have been doing
this for couple years with PB, so it should work :-).
What exact command parameters are you using?
izidor
On Nov 13, 2003, at 7:23 PM, Clark Cox wrote:
I can attest that it does not require root access, as I us it in
several build scripts of mine. Are you sure that you have
permissions to read xx and to write xxx.dmg?
On Nov 13, 2003, at 11:17, Izidor Jerebic wrote:
Hello!
I am not sure where this topic belongs, but many developers are
using hdiutil to create disk images of their applications. And one
very early script for doing so in PB was presented by one of Apple
developers, so here I go...
Previously I was making the release images the long way (as
described in man hdiutil), and now I was pleased that I could do it
all with a single command line. But this command (hdiutil -create
-srcfolder xxx xxx.dmg) seems to requires root privileges. It
cannot be run as a normal user in Xcode custom build command, but
can be run as 'sudo hdiutil ...' on a command line in Terminal,
naturally requiring password entry. Now why would such a command
require root privileges is beyond me. Am I making some mistakes or
is this really impossible to do in a script?
izidor
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.