Codeigniter - setting permissions for directories and files (chmod settings)

Since I do not think that I have rights to all folders and application files, anyway, to check the correct permissions for them?

I mean, does anyone know / have a standard / tutorial / link for Codeigniter to set chmod permissions?

Thanks, any help is appriaciated!

NB: when I say "allover", I mean from the root to all the files in the application and system folder

Also, to indicate a little, I think I had problems with permissions because I transferred my application through a different OS and, for example, macosx set different permissions on directories than windows, etc .... so this kind of hell actually

This is my application diagram:

 /project /application /system /css /img /vendor index.php .htaccess 
+6
source share
2 answers

Do you want to:

 chmod -R 0644 application system index.php 

Assuming that CI is installed in the root directory of the website, with the application/ and system/ directories located there, which is the default setting.

What I usually do is put the application/ and system/ directories outside the root of the website when I use Codeigniter, after which you need to edit the index.php file to reflect this:

 $system_path = '../system'; $application_folder = '../application'; 

Note that you add ../ (and should also move these directories one level down), but I'm distracted. Permissions for each directory should be 0755 and for each .php file 0644, wherever you put them. This includes any supplier, third party, sparks, etc. And any custom asset layouts.

If you use some kind of template engine, good settings will work with permission resolutions 0755 in the place where the engine writes its output and intermediate output, if applicable. If you find this violation, find a host that supports suexec, so you do not need to make these places 777 (or write to the world).

This is easiest done with a terminal (SSH), but can also be easily done with any file manager that your host can support.

+7
source

change the resolution of your codeigniter folder with this command:

 $ sudo chmod 755 -R /var/www/html/Codeigniter_folder_name 
0
source

Source: https://habr.com/ru/post/949355/


All Articles