Folder permissions getting changed when folder is deployed through FTP in cloud 9 IDE - permissions

I am trying to deploy a folder using 'Deploy to FTP Server' option in cloud9 IDE. Folder got deployed correctly on the remote location. But when I tried to access the files in folder I encountered error 403 Forbidden. You do not have permission to access this document.When checked through console, permissions got changed. It is not feasible to change the folder permissions each time. What should I do?
Any help will be highly appreciated.

Related

Error: the templates_c directory does not exist or is not writable

When launching my web application on local EasyPHP web server, I am still getting this :
Error: the templates_c directory does not exist or is not writable
Please make sure that the templates_c directory does exist in the root directory of the generated application and it is writable by the web server user.
Please help me what to do to solve this problem. Best regards.
I try windows sharing authorizations but don't work. Expecting file/folder read/write authorizations manager to be installed on local EasyPHP Devserver.

Web server has no permission to access files on network drive

I want to use DDEV as a local development environment. The setup was successful and the website (a WordPress) is running.
Currenty our team is using XAMPP and to avoid downloading large files on every local machine we create symbolic links (e.g. the "uploads" folder in WordPress). The target is a network drive. So everyone in our team has access to the same files.
Now I want to do the same with DDEV. In WSL I mounted the network drive and created a symbolic link. Inside the console I have full access to the mounted directory, I can create, edit and remove files.
But when I access a file with the browser I get the following error message:
403 Forbidden. You don't have permission to access this resource.
The same error occurs when I try to upload a new file within WordPress.
Is there any way to give the webserver the permission to view and modify the files on a network drive?
The Webserver is an Apache/2.4.38.
As #rfay mentioned I had to add the network drive as volume so it's accessible by the web container. Therefore I created a new docker-compose-file within the .ddev directory (see also in the docs: https://ddev.readthedocs.io/en/stable/users/extend/custom-compose-files/#docker-compose42yaml-examples).
Additionally the permissions on the network drive were incorrect.

After uploading MVC website to the folder httpdocs from FIlezilla and browsing it the showing Internal Server error

I am getting 500 Internal server.I have uploaded files to the server using Filezila .and when i am browsing it.Its showing internal server error.
Whats is the permission of your files and directory's which you have uploaded in your account. Also check your .htaccess file code.
There may be several reasons , let me list few which i think might be the reason.
1) Check the folder and file permissions on the hosting . Folder permission should be 755 and the file permission should be 644 by default to work on
2) If there is any .htaccess file try to remove that file and check again reloading (Note : if you are using cPanel try selecting show hidden files in file manager to view the .htaccess file )
3) whether your db is been properly configured in the configuration file of your MVC site ( however if it is the reason the page will will throw some db connectivity error . just in case if it is i am asking you to check )
If that helps, update me . If not, Kindly post the error log which can be taken in cPanel or if you are using different solution ask your hosting provider on how to view error log.
The best and universal approach if you have root access on the server would be to look for more information in the web server log:
/usr/local/apache/logs/error_log
If you do not have root access, you can check the Error log in cPanel -> Errors, it will provide you with more details on what the problem is.

Permissions error installing new theme in Concrete5

I've just installed Concrete 5 CMS by following the instructions on the website.
The folders application/files/, application/config/, packages/ and
updates/ will need to be writable by the web server process. This can
mean that the folders will need to be "world writable", depending on
your hosting environment. If your server supports running as
suexec/phpsuexec, the files should be owned by your user account, and
set as 755 on all of them. That means that your web server process can
do anything it likes to them, but nothing else can (although everyone
can view them, which is expected.) If this isn't possible, another
good option is to set the apache user (either "apache" or "nobody") as
having full rights to these file. If neither are possible, chmod 777
to files/ and all items within (e.g. chmod -R 777 file/*)
The packages folder has permission 777 and root/tmp folder has permission 755.
I've uploaded a new theme to /packages over FTP. When I try to install the new theme I see the following error:
An unexpected error occurred. fopen(/root/tmp/1419851019.zip) [function.fopen]: failed to open stream:
Permission denied
I have FTP access to the server and access to CPanel. How do I get this working without granting too many permissions which pose a security risk?
My install has the folders application/files, application/config, packages, and updates all set to 755 and it's working just fine.
You get that error because the system is trying to write to /root/tmp, which apparently is the environment configuration for a temp folder when your PHP request is handled.
Try adding the folder application/files/tmp in your file system (within your concrete5 installation). And then make sure that the user can write to that folder that is running PHP in your environment. As explained in the concrete5's own documentation (that you linked originally), it depends on your server which user this is.
Usually in shared hosting environments it's the same as the account you use to login there through SSH or FTP. In these cases, the 755 permissions should be enough if your own user owns the tmp folder you just created.

KLogger Permission denied trying to create log file

I have KLogger installed in my web app and everything worked fine on my XAMPP dev server but once I uploaded all my files to my host I get:
<b>Warning</b>: fopen(/var/log/log_2013-08-15.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in <b>/home/user/public_html/site.net/include/KLogger.php</b> on line <b>177</b><br />
So far I have tried setting the permissions to 777 on both the var and log folders but this doesn't help.
Please help me trouble shoot this.
My hosting provider provides CPanel.
As requested I'm answering my own question.
This was my error all the way. In all of my other files I have a couple of defines for the file paths and I didn't add them to my klogger initialization so it was trying to create a text file on the root var/log directory instead of my home directory.