Skip to content

Wrong Permissions when Extracting ZIP File in cPanel File Manager

Recently, I ran into a peculiar problem while trying to update manually a WordPress theme file for a site I manage. Usually, I’ll just upload the theme file in a ZIP package then extract it using cPanel File manager without any issues with the file permissions.

On this occasion, however, the file permissions were for some reason unknown to me coming out incorrect — instead of permissions 0755 and 0644 for folders and files respectively, both were getting 0666 — the permission of the beast which implied this particular theme package was likely demon possessed!

Image showing files and their attributes inside the cPanel File manager.

Since I had no SSH access to the server, my only solution was to manually change the permissions using the cPanel File Manager context menu option. This however proved to be too time-consuming as it’s not possible to recursively set the permissions as is the case on SSH using the chmod command.

In an attempt to salvage the situation, I did some searches online and quickly learnt that the issue was likely being caused by the ZIP file and not the server as I was suspecting (the server’s cPanel had recently been updated to the new Jupiter theme, hence my misplaced suspicions).

Armed with this information, I decided to put the ZIP file through a brief exorcism: this involved extracting the original ZIP file, then compressing it anew using 7-zip (though you can use other archivers such as the feature-packed WinZip). I then re-uploaded the born-again ZIP file back onto the server and extracted it once more.

Surprisingly, the permissions turned out correct this time! It would seem that my commandless commands drove out the demons just fine.

Share:

Leave a Reply

Feel free to share your comments or questions with me. I may not be able to respond immediately so please check later once I've approved your comment.

Your email address will not be published. Required fields are marked *

Kelvin Kathia

Kelvin Kathia is a writer that's passionate about sharing solutions to everyday tech problems. He's the founder and editor of Journey Bytes, a tech blog and web design agency. Feel free to leave him comments or questions regarding this post, or by leaving him a message on the contact page. If you found his content helpful, a donation is much appreciated.