This question already has an answer here:
I have a web directory /www
and a folder in that directory called store
.
Within store
are several files and folders. I want to give the folder store
and all files and folders within the store
folder all permissions.
How do I do this? I am guessing via .htaccess.
for mac, should be a ‘superuser do’;
so first :
and then
If by all permissions you mean 777
Navigate to folder and
You can also use
chmod 777 *
This will give permissions to all files currently in the folder and files added in the future without giving permissions to the directory itself.
NOTE: This should be done in the folder where the files are located. For me it was an images that had an issue so I went to my images folder and did this.
You can give permission to folder and all its contents using option
-R
i.e Recursive permissions.But I would suggest not to give 777 permission to all folder and it's all contents. You should give specific permission to each sub-folder in www directory folders.
Ideally give
755
permission for security reasons to web folder.Each number have meaning in permission. Do not give full permissions.
If your production web folder have multiple users, then you can set permissions and user groups accordingly.
More info
If you are going for a console command it would be:
chmod -R 777 /www/store
. The-R
(or--recursive
) options makes it recursive.Or if you want to make all the files in the current directory have all permissions type:
chmod -R 777 ./
If you need more info about
chmod
command see: File permissionThis didn't work to me.
I used
-f
also.