Issues with moving WordPress folder to var/www/html (before/after) - wordpress

I am trying to install WordPress on my virtual machine following the official guide at here
Somehow I could not move my wordpress file to the respective folder var/www/html.
The following error are given.
cp: cannot stat ‘~r’: No such file or directory
cp: cannot create regular file ‘/var/www/html/index.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/license.txt’: Permission denied
cp: cannot create regular file ‘/var/www/html/readme.html’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-activate.php’: Permission denied
cp: omitting directory ‘/home/caleb/wordpress/wp-admin’
cp: cannot create regular file ‘/var/www/html/wp-blog-header.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-comments-post.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-config.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-config.php~’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-config-sample.php’: Permission denied
cp: omitting directory ‘/home/caleb/wordpress/wp-content’
cp: cannot create regular file ‘/var/www/html/wp-cron.php’: Permission denied
cp: omitting directory ‘/home/caleb/wordpress/wp-includes’
cp: cannot create regular file ‘/var/www/html/wp-links-opml.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-load.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-login.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-mail.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-settings.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-signup.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/wp-trackback.php’: Permission denied
cp: cannot create regular file ‘/var/www/html/xmlrpc.php’: Permission denied
So after checking the location, I found that I don't have a var/www/html folder due to me removing apache2 previously in a LEMP installation guide.
So I tried to reinstall apache via
sudo apt-get install apache2
After installing, I found that the var/www/html is now available. But still I could not copy the files into the respective folder without using sudo, which is not mentioned in the guide. After copying the files into the var/www/html directory, I am supposed to access my IP address to continue with WordPress installation. Which I failed as well, as the browser directed me to Nginx just like in the LEMP guide instead of WordPress installation page in the WordPress guide. Any idea?
Edit: Tried stopping Nginx service and it does not work. (Does not redirect me to WordPress page)
TL/DR: WordPress folder does not move to var/www/html like how the guide did, and after using sudo to move the folder, localhost does not go to WordPress installation page.

You should have to use sudo to move anything into /var/www/html/.
Use mv not cp
sudo mv /example.com /var/www/html/

Related

Failed to open temporary output file: Permission denied

ubuntu 20.04 install azeronthcore with docker,run ./acore.sh docker build , i had tried
several times but still not working.anyone could help me with this?thx!
root#ubuntu:~/azerothcore-wotlk#
dos2unix: Failed to open temporary output file: Permission denied
dos2unix: problems converting file env/dist/etc/authserver.conf.dockerdist to file
env/dist/etc/authserver.conf.dockerdist
dos2unix: Failed to open temporary output file: Permission denied
dos2unix: problems converting file env/dist/etc/worldserver.conf.dockerdist to file
env/dist/etc/worldserver.conf.dockerdist
Make sure you have permission to create a file in directory env/dist/etc/. dos2unix writes the result first to a temporary file. When something goes wrong in the middle, you still have the original file.

Oracle UTL_FILE.fremove (or frename) permission denied

We have a oracle 12.1.0.2 installation on Linux, we have a procedure that read files from a folder, process data and writes file to another folder, and we have all permission required on the folder, so it works up to this point.
The problem arise when we try to remove the source file from the starting folder, because the database user has all the the rights on the folder but not on the specific file! Users and suppliers can upload file in this folder via ftp and we couldn't find way to replicate folder permission, I attach a couple of screenshots, please help.
Oracle error is ORA-29283: Invalid file operation
Folder Rights
File Rights
During creation of the files, the permission -rwxr-xr-x might be granted by issuing :
$ chmod 755 test_ftp.xlsx or $ chmod a+x test_ftp.xlsx for related file to be able to be deleted.

'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.

script to copy directory to another different directories

I am trying to write a script to copy one directory into another different directories. I wrote the following code:
#!/usr/bin/env bash
dir = "."
for f in "$dir"/*; do
cp -r Source "$f"
done
When I run this script, it tries to copy the "Source" directory on the system directories:
cp: cannot create directory ‘/bin/Source’: Permission denied
cp: cannot create directory ‘/boot/Source’: Permission denied cp:
cannot create directory ‘/dev/Source’: Permission denied
cp: cannot create directory ‘/etc/Source’: Permission denied
cp: cannot create directory ‘/home/Source’: Permission denied
Any tips to make this script run on the current folder ?

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

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

Resources