Wordpress : You don't have permission to access /test_dir/ on this server - wordpress

Hello I am unable to access my folder placed on root directory. have the following error
"You don't have permission to access /test_dir/ on this server."

If using a GUI (desktop) FTP application, right-click (command-click) the folder, choose File permissions and set them to 777.
Screencaptures using Filezilla:

use shell to locate your self to the parent folder of test_dir and Use the command:
sudo chmod 777 test_dir

Related

(Using shared hosting for Wordpress in Hostgator) Installation failed: Could not create directory

Can somebody help me, how should i create a a directory for plugins, there's already a folder created in Hostgator's Cpanel "Public_html>Wp_content>plugins".
But still if i install any plugin, this error pop ups "Installation failed: Could not create directory." please help, Thank You in advance
You just need to give the permission to the folder.
When you installing any plugin it will uploaded to /wp-content/plugins directory.
Now there is three option to achieve this.
1) connect ssh and go to desire path and run chmod command
Chmod 777 -Rf /var/www/html/wp-content/plugins
2) Open file manager from cpanel and go desire path and select folder and give the permission
3) creat a script which give me the folder permission. You can get that script on google
Here is one of the link :
https://gist.github.com/jasperf/5755794

permissions for enabling FTP upload and automatic plugin install in Wordpress

I have a wordpress install and I want to be able to do the following two things:
automatically install plugins via the backend without providing an FTP/SSH user
upload files via FTP
To achieve point 1. I have read that I have to execute the following command: chown -R www-data:www-data /var/www. That means that the user/group www-data becomes owner of all files and folders in /var/www. After executing this command, the automatic installation of plugins works like a charm.
However, I now am not able to edit/upload files via FTP anymore. For FTP I use a different user named ftpuser. The following error is shown in my FTP client when I try to upload a new file: [Filename] open for write: permission denied
I put the ftpuser in the group www-data, hence I think that ftpuser should be able to write:
root#xyz:~# grep 'www-data' /etc/group
www-data:x:33:ftpuser
The file permissions on the folder /var/www are 755.
What is my issue here?
Can you please try by using the below code in wp-config.php :
define('FS_METHOD', 'direct');
Hope that will work.

'Installation failed: Could not create directory.' I get this error everytime i try to download plugin in wp 4.8

I am getting error accessing my admin panel. The error is due to plugin. I fixed the issue by renaming the plugin folder from cpanel and changed it back. Since then,i couldn't download any plugins and get the error
Installation failed: Could not create directory.
You need to set permission on plugin folder/directory, now the user does not have permission to create folder/directory in plugin folder/directory.
You need to set permission on wp-content and all inside folder/directory to 755.
You can set permission via terminal
sudo chmod -R 755 wp-content
wp-content should me you folder path for Linux server path should be /var/www/html/project_folder/wp-content
OR
you can set permission via FTP. Right click on wp-content folder click on permission menu and set 755 permission to the folder.
The permissions or ownership on wp-content/plugins is incorrect. That directory should have a 775 permission set.
If its already that then reapply 755 and checked “apply recursively to all directories and files.
If you use a docker container or docker-compose, you also need to give permission to the database volume.

Unable to create directory wp-content/uploads in Wordpress

I created php files for my plugin and added them to myplugin folder. Then I zipped myplugin folder as myplugin.zip. In Admin Panel of Wordpress I wanted to install my plugin to wordpress. I choosed this zip file and clicked to Install "Now button". Then Wordpress gave an error:
Unable to create directory wp-content/uploads/2013/05. Is its parent directory writable by the server?
What is the problem and how can I solve it? My OS is Linux and I use XAMPP server in my machine.
In your terminal, navigate to the wp-content folder and then run:
chmod -R 0744 plugins
That will set the folder and its subfolders to read/write/execute for you and read for everyone else.
Edit As suggested in the comments, check this out: codex.wordpress.org/Changing_File_Permissions
Alternatively you can just unzip them yourself and save them into this folder:
/wp-content/plugins/name-of-theplugin
Then you can just activate the plugin from the admin page.
I am not entirely familiar with XAMPP but it should be run as a user. Most likely your own windows account. You may try this:
Select the folder wp-content and right click -> properties. then go to Security Tab. There check to see if the User (i.e. you) has write+ modify permission.
Check what is XAMPP server running as, the folder above must have the permissions for the same user.
Double check the "general" tab on the wp-content folder and check the "Attributes" section. Make sure "Read Only is unchecked. If you are changing it, windows will prompt for whether to apply to subfolder. Say "yes".
. Or run XAMPP at Administrator and skip the above step .(assuming it is not production / public internet facing server).
I had this problem yesterday, I solved it by uninstalling the Wordpress module and installing it again as root from the terminal.
I thought if I run the installation wizard as I was logged as root was enough, but it wasn't.
These are the steps for MacOS:
Uninstall wordpress module. Be sure the folder is empty.
Mount the wordpress disk image
cd /volumes/nameOfWordpressModule image
sudo bitnami wordpress module.app/Contents/MacOS/installerbuilder.sh
I recommend you to list the items so you can write exactly the name of the image and app.
Hope it helps!
navigate to your main project folder and run the following:
chmod -R 0777 wp-content
in case of MAC run
sudo chmod -R 777 /Applications/XAMPP/htdocs/

Problem with file permissions in Drupal 7

So, I've copied the install tree of a site I'm developing to another machine. After updating settings.php to the proper db and base_path, and making sure that the file permissions for /sites/default/files/ are set to 755 (chmod -R 755 files), the file settings page (Configuration -> Media -> File System) insist that "The directory sites/default/files exists but is not writable and could not be made writable." I've experimented with 777 permissions to no avail. Any thoughts?
Change ownership of the files directory to apache, or whatever your web user is.
chown -R apache.apache files
If you don't have access to change ownership for some reason, then making all files recursively writable should work.
chmod -R a+w files

Resources