zip file permissions
Good morning
I have some files zipped/compressed under Windows, and therefore they have no unix permissons set.
I just discovered that:
- if the file is unzipped using root, unzipped file's permissions are dirs=755,files=644
- if the file is unzipped using any user account, unzipped file's permissions are dirs=775,files=664
Therefore, if I unzip under user's account I got a 500 error until I manually fix the permissions to dirs=755,files=644.
Is this a normal behavior?
And why?
Thank you
-
Hi, Yes, the archive folders takes the permission of the user that has executed it, so that is a normal behavior.. 0 -
Hi, Yes, the archive folders takes the permission of the user that has executed it, so that is a normal behavior..
Hi. No because it was compressed in Windows, so no unix permissions. I inspected the zip using zipinfo and seen that zip file has no permisions or username saved. However, what you say don't explain why different user got different permissions in uncompression. This is incoherent.0 -
Hi, If you want to understand the statement properly, you can create 2 users, and upload the files to the user through individual user FTP account and then unzip it and see it yourself. 0 -
Hi, If you want to understand the statement properly, you can create 2 users, and upload the files to the user through individual user FTP account and then unzip it and see it yourself.
Hi But the problem is the permissions of files inside the zip file, not the zip file itself.0 -
Hello @darwin7, The behavior you notice stems from the default umask value configured for new files in CentOS. You'd need to modify the default umask value from 002 to 022 in the following files if you want to globally change this behavior: /etc/profile /etc/bashrc Thank you. 0
Please sign in to leave a comment.
Comments
5 comments