Cannot copy contents of Wordpress directory to the web server root - linux

I'm a total newbie at this!
I have a virtual machine running Debian 9. I have LAMP installed.
I am following the instructions at this link to install WordPress:
https://www.adminbyaccident.com/gnu-linux/how-to-install-wordpress-on-debian-9-lamp-stack/
I am now at this step:
We now copy the contents of the wordpress directory to the web server root.
albert#debian:~/wordpress$ sudo cp -a ~/wordpress/* /var/www/html
[sudo] password for albert:
albert#debian:~/wordpress$
However, when I try this (I don't use "sudo" because it's not installed on Debian by default), I get the following error message:
Someone please help me!!!
Thank you so much.

It looks like the wordpress directory is not in the root directory.
Did you cd somewhere after downloading? If not, the wordpress dir should be at your current dir which is /home/lanalee/.
Type in ls to list all files in /home/lanalee/. If the list shows a directory named wordpress, you can continue with the following command:
cp -a ./wordpress/* /var/www/html
I replaced the ~ which points to your systems root directory with a . that refers to the folder your currently in.
If there is no wordpress directory listed, please type ls ~/ and share the output with us.

Related

How to make directory at Linux root directory from terminal when in sub-directory?

Background: OS is Debian GNU/Linux.
I am trying to make a directory at root, when I am in a sub-directory. In other words, let's say I am at the directory /a/b/c, and I want to make a directory at the root level, called d. How do I go about doing that?
In case you can't tell, I also don't know all the right wording/terms.
UPDATE: I did not understand difference between home directory and root directory. I learned about pwd command, and that solved the problem. What I actually wanted was to make a directory within the home directory.
Assuming that you have the required permissions, you could do mkdir /d.
It should be like sudo mkdir /name_of_directory

Linux Mint: Bitnami Xampp access issue

I have installed Bitnami Xampp on linux mint, it is installed inside /opt/
The application is unable to access(Write/Read) files and hence not able to work on it.
Any Solution Please........
Thank You
It is simple access issue. So I need to give read write access to folder and file using chmod command:-
--$ sudo chmod -R 777 opt
I have to admit that I am don't really know Xampp but with the command you mentioned above you changed the the access rights for the top level directory /opt and thru using 777 you gave basically all rights to everbody using your system. If Xampp now tries to write something, it of course can because you gave it the rights (like to anyone else).
The -R option you used in the chmod-command above means, that you have changed the access rights for all subdirectories of /opt also (recursively).
I would recommend that you change this back to the original access rights for /opt and, if you need, just change the access rights for the directory where Xampp is placed. Then Xampp should also work because it can read an write in it's own subdirectory and there won't be any harm for or from other applications from /opt because they can't access /opt/Xampp and Xampp can't access their directories.
After the previous setting
--$ sudo chmod -R 777 opt Xampp is not working with following error
PhpMyAdmin “Wrong permissions on configuration file, should not be world writable!”
Then I followed PhpMyAdmin "Wrong permissions on configuration file, should not be world writable!" and now working fine...
Thank god it saved me from switching back to Windows. That I hate.....

How to delete a folder or a file from usr/bin in linux/fedora

I am using fedora ,
Unfortunately i had downloaded a package(for example 'selenium' or 'chrome') in the bin folder.
But i don't want that package in the bin folder, i want to remove it from the folder, i am unable do it manually as well as from the the terminal, so can anyone let me know how to delete a package from bin folder.
Actually i am trying to download a package as below from terminal
svn checkout http://selenium.googlecode.com/svn/trunk/ selenium-
read-only
But i didn't see my path in terminal when i am downloading i.e., usr/bin , so the package has been downloaded in bin folder now.
Please help me out through this.
the /usr/bin folder is a protected folder which usually root user have full access to it
so if you want to make a change in it you should have a full access which can gain by "su" or "sudo" commands
try these commands on your terminal
su
<type your root password>
cd /usr/bin
rm <your special file names you want to remove>
you can do it by sudo too
cd /usr/bin
sudo rm <your special file names you want to remove>
<type your root password>
You don't have privileges of deleting a file or folder in the /usr/ directory unless you are the root user. Therefore you can do that by right-clicking on the /usr/ directory and Open as root. This gives you the rights of the root in that directory.

gitweb not loading repositories through symlinks

I have gitweb on localhost and a sample project for which I've executed the git init git add and so on. I create a symlink with sudo ln -s /media/dir/project/.git/ /var/cache/git/project.git but it doesn't work and I still get 404 - no project found at localhost/gitweb.
The only way I can only bring the project info titles such as description, ..., then without project info, only the 4 sorting options, is to copy the git physically to /var/cache/git/project.git/ though some files won't be copied. This is the only way I could only not receive the not found error.
I manipulated the /etc/gitweb.conf and /etc/apache2/conf.d/gitweb in anyway, but it didn't help.
(I'm using apache 2.2 under Kubuntu 11.10)
Thanks so much for your helps!
Check the permissions on all of the directories in the symlink path. Whatever user your cgi is running as needs at least +x on all the parent dirs and +r on the .git directory and files.

working on lamp server in ubuntu

i m working on ubuntu and just installed lamp.As i m new to linux i m not sure how to create a directory or file under /var/www of lamp server to start working on my website project
Under *nix you can create a directory using mkdir newdirname and you can create a new and empty file, using touch newfilename. Those are commands you need to execute from a shell/terminal. In order to get to /var/www, you will need to cd /var/www.
If you are new to Linux I suggest reading any guide on basic like this or this.
Chances are you do not have sufficient privileges as your normal user to add files or create directories. You can either change the ownership of the /var/www directory (and everything within) or you can sudo each one you want to add.
From the prompt: chown [your_user_name].users -R /var/www
Then you can mkdir [directory name] to make a directory or touch [filename] to create a file.
If you do not change the permissions of the /var/www you may need to put sudo in front of each of the above commands (will be prompted for password)

Resources