NoDoze Posted August 14, 2008 Share Posted August 14, 2008 But it keeps failing... This is what I have: if (!chdir ("/home/user/public_html/folder/{$_POST['user_id']}")); { echo "failed to change directories..."; exit; if (!system("tar -zxvf files.tar")) { echo "failed to unpack files.tar"; exit; } } I think it's a permissions thing....But I'm not sure how to chmod that either... if (!chown ("/home/user/public_html/folder/{$_POST['user_id']}", nobody)); { echo "failed to change file owner..."; exit; } Cause it's all via php, the file.tar is being copied with apache permissions, when the rest of the files in the destination folder are nobody permissions... I dunno if that would make any difference or explain why it's not unpacking them...? Thanks for the help! Link to comment https://forums.phpfreaks.com/topic/119757-trying-to-unpack-tar-files/ Share on other sites More sharing options...
NoDoze Posted August 14, 2008 Author Share Posted August 14, 2008 *sigh* I even tried adding: chmod ("/home/user/public_html/folder/{$_POST['user_id']}/file.tar", 0777); chown ("/home/user/public_html/folder/{$_POST['user_id']}/file.tar", "nobody"); chdir ("/home/user/public_html/folder/{$_POST['user_id']}"); before the unpacking... But it didn't work Please help. Thanks! Link to comment https://forums.phpfreaks.com/topic/119757-trying-to-unpack-tar-files/#findComment-617001 Share on other sites More sharing options...
NoDoze Posted August 15, 2008 Author Share Posted August 15, 2008 Can anyone help me...? At least provide a direction or some insight...? Thanks. Link to comment https://forums.phpfreaks.com/topic/119757-trying-to-unpack-tar-files/#findComment-617178 Share on other sites More sharing options...
NoDoze Posted August 15, 2008 Author Share Posted August 15, 2008 *bump* Link to comment https://forums.phpfreaks.com/topic/119757-trying-to-unpack-tar-files/#findComment-617523 Share on other sites More sharing options...
NoDoze Posted August 18, 2008 Author Share Posted August 18, 2008 Wow.....still no takers...? That's odd.... *bump* Link to comment https://forums.phpfreaks.com/topic/119757-trying-to-unpack-tar-files/#findComment-619337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.