Permissions Issue

I am getting a permissions issue, I am on OS X 10.10.5, the troubleshooting documentations does not provide any information on which files I should chmod.

It really depends on your setup. If you are running on OS X with Apache setup like I have explained in these blog posts, you will not have any permissions issues.

If your trying to run with your files outside of your user folder, then you will need to sort permissions out. Those chmod commands in the Troubleshooting section of the docs should be run while you are in the root of your Grav folder.

thanks, I am running it from ~Users/nic.rodriquez/Sites folder where I keep my local work

Then you will need to at least change the user/group that apache is running under. See the blog post I linked to for more information on this.

I can strongly recommend following these blog posts as they will leave you with a highly optimized, pain free solution, with the ease of switching between PHP versions.

I am also using MAMP Pro, I changes the Run Apache/MySQL server as user setting to nic.rodriquez/nic.rodriquez it is running now. is there a way around this?

That should work then. If your files are owned by your user, and the webserver is running as the user all should be good.

maybe you can paste EXACTLY what the permission error is you are seeing???

Screen Shot 2015-10-30 at 1 this is what I am getting now

-> ls -gal
total 248
drwxrwxr-x@ 23 GATEWAYSTAFF\Domain Users 782 Oct 30 12:07 .
drwxr-xr-x 31 GATEWAYSTAFF\Domain Users 1054 Oct 30 12:51 …
-rw-r–r--@ 1 GATEWAYSTAFF\Domain Users 8196 Oct 30 12:07 .DS_Store
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 2519 Oct 30 04:12 .htaccess
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 35718 Oct 30 04:12
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 1071 Oct 30 04:12 LICENSE
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 5608 Oct 30 04:12
drwxrwxr-x@ 3 GATEWAYSTAFF\Domain Users 102 Oct 30 04:12 assets
drwxrwxr-x@ 3 GATEWAYSTAFF\Domain Users 102 Oct 30 04:12 backup
drwxrwxr-x@ 5 GATEWAYSTAFF\Domain Users 170 Oct 30 04:12 bin
drwxrwxr-x@ 7 GATEWAYSTAFF\Domain Users 238 Oct 30 13:06 cache
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 1117 Oct 30 04:12 composer.json
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 35888 Oct 30 04:12 composer.lock
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 2519 Oct 30 04:12 htaccess.txt
drwxrwxr-x@ 3 GATEWAYSTAFF\Domain Users 102 Oct 30 04:12 images
-rw-rw-r–@ 1 GATEWAYS TAFF\Domain Users 1083 Oct 30 04:12 index.php
drwxrwxr-x@ 4 GATEWAYSTAFF\Domain Users 136 Oct 30 13:06 logs
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 2342 Oct 30 04:12 nginx.conf
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 24 Oct 30 04:12 robots.txt
drwxrwxr-x@ 10 GATEWAYSTAFF\Domain Users 340 Oct 30 04:12 system
drwxrwxr-x@ 8 GATEWAYSTAFF\Domain Users 272 Oct 30 04:12 user
drwxrwxr-x@ 18 GATEWAYSTAFF\Domain Users 612 Oct 30 04:12 vendor
-rw-rw-r–@ 1 GATEWAYSTAFF\Domain Users 2901 Oct 30 04:12 web.config

and this when i run an ls -gal

Ok your permissions are all messed up on those files :slight_smile: That script should fix this up.

Navigate to your Grav install:

$ cd ~Users/nic.rodriquez/Sites/grav

(or wherever you have installed Grav to. Copy the contents of this into a file:

$ vi

paste in this:

chown nic.rodriquez:staff .
chown -R nic.rodriquez:staff * 
find . -type f ! -path "./bin/" | xargs chmod 664
find . -type f -path "./bin/" | xargs chmod 775
find . -type d | xargs chmod 775
find . -type d | xargs chmod +s
umask 0002

Then make it executable:

$ chmod +x

then run it:

$ ./

thanks! getting a Permission denied when running the ./

is it a 700 permissions? The chmod +x should do that for you. Also the ./ is important… the ./ bit…

I have the same problem and if i run the script i get the errors:

: File name too long

chmod: missing operand after ‘775’

Can you help me please?

I think i fixed the : missing 775 problem with adding “-0” like:

find . -type f -path “./bin/” | xargs -0 chmod 775

but not the file name too long problem.