Welcome Guest, Not a member yet? Register   Sign In
tree permissions
#1

[eluser]Cristian Gilè[/eluser]
Hi guys,

what are the best settings for tree permissions of a CI project?

Please, could you suggest the symbolic notation for each CI folder?

root
system (helpers, libraries etc.)
application (controllers, models, views etc.)


I need the notations because i have moved files from one pc to another one and i have lost original permissions.


Cheers


Cristian
#2

[eluser]jedd[/eluser]
Hi Cristian,

Everything should be readable by your web server, and read-writable by your development account. There might be some bits that need to be writable by your web server, such as the cache system if you use it, but they'll become obvious pretty quickly. You didn't mention what operating system you're on so it's harder to give specifics here. Fallback option - download the same version of CI again, expand it into a sub-directory parallel to your copy, and do a hand compare that way.
#3

[eluser]Cristian Gilè[/eluser]
Thanks for your reply.

I'm using Debian.

Is there no particular permission for views, controllers and models files?


Cheers


Cristian
#4

[eluser]jedd[/eluser]
Quote:I'm using Debian.

Ahh, you're one of us ... why didn't you say so earlier!

Quote:Is there no particular permission for views, controllers and models files?

Whatever works, really. Your web server runs as www-data, and you (really you) should be in the group www-data, so you need all your files in the structure .. well, this:
Code:
# chown -R www-data:www-data  /var/www/path/to/your/CI/instance

Permissions are generally 775 for directories, 664 for files. Contents of my application directory (f.e.):
Code:
$ ls -al
total 48
drwxr-xr-x 11 www-data www-data 4096 2009-02-22 19:20 .
drwxr-xr-x 13 www-data www-data 4096 2009-02-10 19:14 ..
drwxrwxr-x  2 www-data www-data 4096 2009-02-10 19:14 config
drwxrwxr-x  3 www-data www-data 4096 2009-03-14 15:41 controllers
drwxrwxr-x  2 www-data www-data 4096 2009-02-10 19:14 errors
drwxrwxr-x  2 www-data www-data 4096 2009-03-16 02:27 helpers
drwxrwxr-x  2 www-data www-data 4096 2009-02-10 19:14 hooks
-rw-r--r--  1 www-data www-data  114 2008-11-13 16:59 index.html
drwxrwxr-x  3 www-data www-data 4096 2009-02-10 19:14 language
drwxrwxr-x  2 www-data www-data 4096 2009-03-14 14:54 libraries
drwxrwxr-x  2 www-data www-data 4096 2009-03-14 23:24 models
drwxrwxr-x  5 www-data www-data 4096 2009-03-15 01:04 views

I'd suggest chmod g+w - for everything under system/application - and ensuring that GID is www-data at the same time - will solve all your woes.
#5

[eluser]Cristian Gilè[/eluser]
Thanks a lot.

Great support!!



Cheers


Cristian




Theme © iAndrew 2016 - Forum software by © MyBB