I'm trying to edit a wordpress .php file through Filezilla. I've connected correctly to the AWS instance with an ubuntu username. The problem is, I can view and make changes to the .php file but when I try to save those changes or re-upload them I get a permission denied error. I can add the file to the /ubuntu folder but no the /home folder where the wordpress files are located. That's as far as I can get at the moment, I know the permissions have to be changed, but i'm not sure how. Just trying to help out a non-computer savvy friend. Any help will be appreciated, cheers.
Right click on file and go to file permissions and give the permission
for file 644
for folder 755
To change file permission on ubuntu use sudo chmod {options} filename
link
Make sure that while creating any file or editing the file use sudo vi filename
Related
I am looking for the correct way to set up permissions on files and directories so that FTP user can update the files while HTTPD process can read/write everything inside wp-content.
Basically, we need to add apache user to USER group and vise-versa then set 664 and 775 on files/dirs and that will work.
The problem is with files being uploaded via FTP gets 644 and ownership by USER while files created by apache will have ownership of apache.
Could be great if someone can help here based on experience and tests and not only on guessing.
Thank you all!
I am looking for the correct way to set up permissions on files and directories so that FTP user can update the files while HTTPD process can read/write everything inside wp-content
all file folders need to be "0755"
all files need to be "0644"
I can't get Fedora to allow med to delete installation files or write the configuration.php. I have chmod 777 all files and directories.
chown apache:apache all files.
It will work correctly if I copy the configuration.php to the directory. But then I can't upload templates because the joomla/tmp folder is not writable.
Any ideas how to get it to work?
Firstly, change back the file permissions. Do not make everything 777. Files should be 644 and folders should be 755.
The reason why you are not able to edit files or upload anything is due to the folder ownership. This is something that you hosting provider will need to sort out for you.
The actual problem was that SELINUX prevented apache from writing to disc.
I'm trying to set up a fresh install of drupal on on linux box and I'm getting the error:
Settings file The settings file does not exist.
The Drupal installer requires that you create a settings file as part of the installation process. Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php. More details about installing Drupal are available in INSTALL.txt.
I have set the permissions for the settings.php file but it is still doing it. sites,default and files all have 777 permissions but it still won't work. I have both the default.settings.php and settings.php in the default folder.
Thanks
You have to keep in mind some things:
Your web server has to have the permission to run your code. If you are using Ubuntu, it would be better if you give www-data.www-data (user and group) permission to sites/default folder
To give 777 to files is dangerous because someone else can read this sensible file
Remember that all folders, including your Drupal root folder has to be readable, which means it has to have some thing like 755 permission.
Most time, this problem is related to the user running the web server and files.
Change back the settings.php permission.change settings.php permission to 755. (read only, to make protected)
Step by step:
Copy file default.settings.php to settings.php (do not rename). Now you have both files.
Change file permission settings.php to read/write with chmod 644 settings.php
Continue the installation..
After all installation finished, change file permission settings.php to read-only with chmod 755 settings.php
I hope it helps you
I have fixed that by this:
chown -Rv apache:apache /var/www
go to the directory that contain default.settings.php & settings.php files then, right click on each one then click on Get Info then scroll down until you see the permission of that file, make sure it's 'read & write' enter image description here
I have been trying to find answers. I'm using text wrangler for mac. When I try to save theres an error. I put my XAMPP on my application folder and I was thinking that it was in the application folder and you can't make any changes. I need to know how to save it. By the way when i move something it keeps asking me to authenticate. Help!
This happened to me before as well. Most likely you need to change the directory permissions. Go to '/Applications/XAMPP/', and change the permissions of the htdocs directory. Here's how.
you just don't have authority save it. if you want to do this, pls give the authority to text wrangler.
you can try this in terminal.
sudo open filename -a applicationname.app
for example:
sudo open test.php -a Coda.app
or you can try to change the folder's access permission by using chmod in terminal
for example:
chmod 774 foldername
My code gets a permission denied error at the move_uploaded_file() function when I'm trying to save a file into a folder on my server (from the temp folder).
My user has full permissions across all the website directories and files. Is there an apache user that need permissions as well? How do I give permissions to this apache user?
If that isn't the case. Is there a way I can use the php chmod function to fix this problem?
Thanks for the help!
You are correct. The folder you need to move the file to doesn't need you to have permissions, it needs for the web server to have permissions.
Basically you need to figure out what account your web server is running as and give that user write permissions to the destination directory.
To figure out what your web server account name is, try the following command (assuming you're running Linux):
sudo lsof -i tcp:80
You should get back a bunch of lines with a USER column. One will be root, ignore that one. The other user listed is the user under which your web server is running. It's probably something like www or www-data or apache or the like.
After that, navigate to the parent directory of your upload directory and change it's ownership and permissions with the following command:
sudo chown www-data:www-data uploads
sudo chmod u+w uploads
At that point, your webserver user now has access to write to your uploads directory. If you have any trouble, post a comment and I'll try to help out.
I assume you gave the folder 777 permissions? The folder needs those permission.