After tar extract, Changing Permissions
Posted
by Moe
on Stack Overflow
See other posts from Stack Overflow
or by Moe
Published on 2010-05-23T13:31:46Z
Indexed on
2010/05/23
13:40 UTC
Read the original article
Hit count: 217
Just a Question Regarding unix and PHP today.
What I am doing on my PHP is using the Unix system to untar a tarred file.
exec("tar -xzf foo.tar.gz");
Generally everything works fine until I run into this particular foo.tar.gz, which has a file system as follows:
Applications/
Library/
Systems/
After running the tar command, it seems that the file permissions get changed to 644 (instead of 755).
This causes Permission denied (errno 13)
and therefore disabling most of my code. (I'm guessing from lack of privileges)
Any way I can stop this tar command completely ruining my permissions?
Thanks.
Oh and this seems to only happen when I have a foo.tar.gz file that Has this particular file system. Anything else and I'm good.
© Stack Overflow or respective owner