Zip files, extraction and mass permissions

Status
Not open for further replies.

probiner

Member
Messages
31
Reaction score
0
Points
6
Hello and thanks for any help in advance.

Context:
I have quite limited acess to the internet so what I do to workaround this while setting up my TikiWiki website is to use EasyPHP at home and when I like it enough to put it online I:
- ZIP the website contents, export the Database tables.
- I get to the Internet access point, upload the database tables, with File Manager upload the zip with 755 permission option and extract the ZIP and voilá.

Problem:
Many files come out of the ZIP with permission 700. This causes those files not to load when I browse the page, breaking it.

Details:
I have a Wordpress build content in my public_html folder and the TikiWiki in a sub-folder. I don't know where on the host the permissions are stored.
I did use FileZilla FTP to change the folder and all sub-folders and sub-files to 755, but that takes a lot of time and by the time my access time expires, FileZilla is not finished with the permissions yet.

Questions:
How can I have all those files coming out of the ZIP with the right permissions, fast and easy?
Apparently, cPanel doesn't change the permission for sub-folders and sub-files, or does it?
Can I control the file permissions at home before/when I zip them? How? I'm using 7z


Cheers
 
Last edited:

probiner

Member
Messages
31
Reaction score
0
Points
6
So... no one had this issue before...
 
Last edited:

stgeorge

Member
Messages
113
Reaction score
0
Points
16
The basic thing to remember is that virtually all files require 644 Permissions and all directories require 755.
(config files should be set to 400 but 644 will still work for now - security etc)
(some temp directories require 777 but that is extremely rare)
All directories naturally go to 755.
So when you extract you are asked on upload files (re mode) whether you wish to set the files at 644.
Check the box for yes.
Upload the archive and extract.

Now let us know what the permissions are.

It is obviously easier to recursively FTP directories.

Questions:
What OS is the Archive made with, (ie Win, Linux or Mac)?
What archiver did you use?

The reason I ask is that a PC OS will often not set the files archived to Server Permissions as you are naturally as the PC user, the owner.
 
Last edited:

stgeorge

Member
Messages
113
Reaction score
0
Points
16
I have just noticed you are using 7z which means you are in windows.

The easiest way to do this is with xamp for a production environment as the files and permissions are already created for Server environment.

Personally I would forget production on your computer and build the website live and online.
You simply install all the plugins etc that you have already.
Drop the tables in phpMyAdmin and Upload the database with all the work in it.

You can use .htaccess to redirect to a maintenance page and whitelist your IP while you do this.

Here is a link re .htaccess maintenance page:
http://winfoes.co.uk/forum/Coding--Scripting/585-htaccess-redirect-during-maintenance
 
Last edited:

probiner

Member
Messages
31
Reaction score
0
Points
6
stgeorge

Thank you for the insight.
I did see some different behavior when I unchecked all files and folders with "Read-Only" before archiving the ZIP.
The files and folders now come out 644 and 755 instead of 600 and 700.

So when you extract you are asked on upload files (re mode) whether you wish to set the files at 644.
Check the box for yes.
Upload the archive and extract.
When I press the "extract" button in file manager, I'm only asked where do I to output the files.
I'm only asked for permissions when I upload the zip, but that's for the zip file only, i guess.

Thank you for the htacess management link.

So much to learn :smile:

Up to know, I'm super happy with x10hosting experience :redface:

Cheers
probiner
 
Last edited:
Status
Not open for further replies.
Top