Permission Denied Error Solved !!!!
Whenever Or Sometimes when you set up a new server or when you upload new folders and try to upload images or try to make anything writable, You may see an error like failed to open stream: Permission denied.
So this is basically a permission error that your folders may not have set to 777 instead they are set to 755 or any other & you can check this from FileZilla by Rightclick -> File Permissions and then you can see something like this.
So Don’t worry about this we have a solution for this and it works like a gem.Commonly this error comes if your server operating system is Ubuntu, Linux etc..
Open your Terminal which in simple can call as CMD – Command Prompt and go to the path for which Folder(s) you want to set permission and then Execute Following Command.
To set permission for Folders inside a particular folder ↓
Goto path then chmod -R 777 /your path with this all the files, folders, images, content inside that will be set to 777
Eg: If my path is /var/www/html/vbloggers then i will set as chmod -R 777 /var/www/html/vbloggers
To set permission all Folders inside your root ↓
Goto root path then chmod -R 777 ./ with this all the files, folders, images, content inside that will be set to 777
Eg: If I want to set permission for folders images then first I will goto my path using cd /var/www/html/vbloggers/images ↵(enter) and then chmod -R 777 ./
That’s it now I can make any file write and upload my images without any issue.