![]() |
|
Think about Loose Coupling | |
PerlMonks |
Script not setting ownership of new directoryby bradcathey (Prior) |
on Jul 29, 2008 at 02:46 UTC ( #700718=perlquestion: print w/replies, xml ) | Need Help?? |
bradcathey has asked for the wisdom of the Perl Monks concerning the following question: Fellow Monasterians, I comfortable working on the command line to do this, but I've created Web app that uses CGI's upload method to upload a file from the browser. On the way, if the subdirectory 'foobar' doesn't exist, my script makes it. I have the permissions working, but I'm getting the desired ownership of:
instead I'm ending up with:
Likewise, the file ownership itself is the same:
Here's my script:
Is this even possible? Thanks. Update: Fixed typo Update 2: per comments of the good monks, I changed chown 'www-data', 'sftp', 'foobar' or die; to chown -1, 1003, 'foobar' or die; (1003 being the numeric equivalent for the group) for success.
—Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
Back to
Seekers of Perl Wisdom
|
|