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.
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 permission
and if you have a symlink to said folder, to change the permissions on the symlink do
chmod -h 777 /some_path/symlink
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.
sudo chmod -R 755 /www/store
Each number have meaning in permission. Do not give full permissions.
N Description ls binary
0 No permissions at all --- 000
1 Only execute --x 001
2 Only write -w- 010
3 Write and execute -wx 011
4 Only read r-- 100
5 Read and execute r-x 101
6 Read and write rw- 110
7 Read, write, and execute rwx 111
- First Number 7 - Read, write, and execute for user.
- Second Number 5 - Read and execute for group.
- Third Number 5 - Read and execute for other.
If your production web folder have multiple users, then you can set permissions and user groups accordingly.
More info
0 Response to "Chmod 777 to a folder and all contents"
Posting Komentar