PrestaShop : While installation PS every time this F*****g Folder and Files permission issue happens to me.
In general cache folder needs 777 permission and rest are 755 for folders and 644 for files. Following is PHP script which will do that. It solved many permission related issues.
Following PHP script will update all folder permission to 755 and all files with 644 permission.
What are File Permissions?
There are three types of permissions:
You can view your file permissions in your cPanel File Manager or FTP Client. They will display not with the letters, but with numbers. The numbers used are:
7 = read, write, execute
6 = read, write
5 = read, execute
4 = read only
3 = write, execute
2 = write only
1 = execute only
0 = Access Denied
The File Permissions will show as three numbers. The numbers always go in the same order:
In general cache folder needs 777 permission and rest are 755 for folders and 644 for files. Following is PHP script which will do that. It solved many permission related issues.
Following PHP script will update all folder permission to 755 and all files with 644 permission.
<?php
exec ("find /path/to/folder -type d -exec chmod 0755 {} +");
exec ("find /path/to/folder -type f -exec chmod 0644 {} +");
?>
What are File Permissions?
There are three types of permissions:
- Read
- Write
- Execute
You can view your file permissions in your cPanel File Manager or FTP Client. They will display not with the letters, but with numbers. The numbers used are:
7 = read, write, execute
6 = read, write
5 = read, execute
4 = read only
3 = write, execute
2 = write only
1 = execute only
0 = Access Denied
The File Permissions will show as three numbers. The numbers always go in the same order:
- User
- Group
- World
No comments:
Post a Comment