giving write permission to nginx public folder on ubuntu 16.04 - php

Just did a fresh installation of nginx on my local machine.
I am trying to give write permission to nginx public folder but I get this error mod: cannot access '/usr/share/nginx/html': No such file or directory
the public file path for the nginx server is file:///usr/share/nginx/html
Please assist

First thing you should make sure is, your path is correct. Confirm if the folder name is "html" or "public_html".
Then you apply your permission using "sudo" prefix if you are not root user.

Related

Codigniter is not working after uploading to Linux server

Created an application using Codeginiter and is working fine with my local environment which is in XAMPP.
After uploading application folders and files to linux server application is not working at all.
Deployed complete files under "/var/www/html/" and when access from browser it gives me CI error as "404 Page Not Found".
After uploading, I have updated .htaccess file.
I think this is about Linux file permission. You might want to check its file permission.
try to change the permission to read, write and executed by you ONLY example:
sudo chmod 700 var/www/html

Permission Denied cPanel or PHP file upload

I am trying to upload a file through cpanel or wordpress admin panel, but cpanel shows permission denied and wordpress requires ftp access (probably for the same reason). What may be the cause of this?
The public_html directory contains files that were copied from public folder of another server via rsync to /home/somename and then I ran cp command to move these files to public_html. And now, all this is happening. Before cp, there was previous version of website that was working fine.
I'm using Centos 6.3 with Apache
Likely ownership issues.
For Centos 6 the default group for Apache is apache
Go to your webroot, and set the permissions to chown -R apache:apache *
Then make sure to set the permissions 0755
You may be better served by creating a new group and adding both yourself and apache to it. Then assigning the permissions to apache:<your new group>

Need to reset the file permission in plesk

I use the plesk panel to upload and download the files from the server , currently the httpdocs folder permission is being set to rwx r-x --- and when i try to access the folder then it does not allows me to access the folder from the FTP as well as from the plesk.
From the plesk though i get an error following error:
Unable to change directory to /httpdocs: filemng: opendir failed: Permission denied
System error 13: Permission denied
i need to change the folder permission for the httpdocs so that i can access the files in it.
i have tried to refer the KB parallel http://kb.sp.parallels.com/en/1528
but was confused in the sense that how could i change the permission. i am using windows PC , please guide me on this , thanks a lot.
I had the same problem, after i tried to install Magento from the Plesk application manager. I searched and got this link http://kb.odin.com/en/124519and did it exactly as the article instructed. domain.tld - it means the particular domain name with its extension, such as .com, .org, .net. Everything worked, in ftp and file manager i was able to access the files and folders.
Resolution
Run the commands below with superuser privileges to download the archived shell script.
Unzip it and execute, providing the needed domain name as an argument:
~# wget http://kb.sp.parallels.com/Attachments/23464/Attachments/recover_plesk_directories.zip
~# unzip recover_plesk_directories.zip
~# sh recover_plesk_directories.sh domain.tld
domain.tld = yourdomainname.com/org/net... whatever, i hope i had been more clear....
For each domain you shall run the command 'sh recover_plesk_directories.sh domain.tld' separately.
Login on server as root via ssh connection and restore default permissions for virtual host directories with help of following command:
/usr/local/psa/bin/repair --restore-vhosts-permissions

When creating virtual-host, apache would work only with /var/www/html/ directory

I just moved from WAMP to LAMP, and can't figure out this problem that I am facing.
Whenever I create new vhost which is not in this directory /var/www/html/ i get a 403 forbidden message. (Permission are the same and there is an index file)
It seems to me that somewhere in Linux you specify a list of directories and apache works explicitly with those ones.
I use Apache 2.4.6.
I appreciate your help,
After checking the error log(vhost), I found this error message "search permissions are missing on a component of the path".
Meaning that one of the parent directories from where the vhost was located didn't not have search (+x) permission for the apache user.

Access forbidden in linux mint for apache localhost

I am doing PHP development using Linux OS ,Lampp Apache server.I changed the default root folder htdocs to another folder PHP on my desktop. When I create a hello.php file in the folder ,I can see it in browser and works well.
But I have another folder inside this root folder called 'front_end'.When I try to see it in browser using http://localhost/front_end ,i get access forbidden.
Firebug shows 'Access forbidden'
How can I get access to this folder using localhost?
Another user asked a similar question on stackoverflow ,but it didn't help.
Ubuntu/Apache2/ Forbidden/Permission error
Assuming you have followed the advice regarding the file permissions.
Have you got an index.php file in the front_end directory?
If not that may be why you get 'Access forbidden'. See Apache 403 Forbidden Error and Solution Try accessing the spesific php file in the directory e.g. /front_end/test.php
Permissions on the folder
Check the permissions of the folder.
Use sudo to create the folders.

Categories