[Chicago-talk] mkdir() question

Michael Potter michael at potter.name
Fri Dec 3 15:49:24 PST 2010

On Thu, Dec 2, 2010 at 3:16 PM, Young, Darren
<Darren.Young at chicagobooth.edu> wrote:
> I need some ideas on a problem I'm having doing mkdir and chown in Perl. The Perl script I have is running as a CGI under Apache 2.2.3 (RHEL). This script is the receiving end of a web service using SOAP::Lite (client is C# .NET). This script needs to do a mkdir for a user home directory and change permissions on it to that of the user (and their primary GID).

Here is an idea, I have not thought this all the way thru, but maybe
it will inspire:

How about building a .tar file with the starter files.
gtar has so many options perhaps there is an option to create the
directory while untaring and perhaps set the user.

You will still need to run as root, but perhaps the command you need
to run as root will be less hackable.

good luck,
Michael Potter

More information about the Chicago-talk mailing list