Help to create folder in htdocs directory
Newby here :-)
See in GUI the htdocs directory and want to create folder there for my web files. Tried to right click and option was grayed out. Went to Terminal and got # privilege but still can't create. Saw somewhere that this command would do it, but alas. no. Code:
sudo chmod 755 -R htdocs Quote:
|
You will need to learn how basic Unix/Linux file ownership and permission work.
For others to be able to help you will need to tell us what the current ownership and permissions of the directory currently are, what owner and permissions you want to assign, and what user is making the change. I see that you are working as root (root@david-HP-Compaq...) so it is not necessary for you to use sudo (I would also recommend that you learn what sudo is for and how it works on your distro). You have also changed into the /opt/lampp directory, so we will assume that is where the htdocs directory of interest is located. So, from that location please post the output of ls -l (that is a "dash-ell" option). That will show us the current ownership and permissions of the htdocs directory, if it is actually there. You show us the command, (sudo) chmod 755 -R htdocs, and it apparently produces no error, so it most likely worked. What were you expecting the result to be, and why do you say "alas, no"? |
Also, since you are digging around in /opt/ it looks like you might have accidentally installed XAMPP instead of normal packages. So I ask, which distro are you using? I ask because once you uninstall XAMPP, the right packages can be added instead from the official repositories by a click or two, then the system will keep them automatically updated for you and it'll be easier to work with the files and directories being in the right places.
|
If you run a chmod command and it goes back to the prompt, that generally means success so post the output of the ls -l command suggested. It's always a good idea to indicate which version of Linux you are using as there are well over 500 different one.
Quote:
|
Thank you guys for the help and advice it is greatly appreciated.
I will read up and try and maintain what I read :-). I was eventually able to get the permissions correct for creating in htdocs where I have my site files, so that is done however so much more to do. No doubt will be back begging for help again. |
Quote:
i hope you DID NOT DO THIS " chmod 777 " "htdocs " is owned by ( i am guessing ) Apache ( or XAMPP) and the user apache/XAMPP is in the root group cd to the location and use " mkdir" as root to create a folder THEN use "chown"( as root) on that folder to make your normal user are owner then you can add your files |
Yes Xampp. No didn't do the 777. I understand the permissions as I am webmaster for many sites on a shared server, however, everything is done via WHM or Cpanel, so it is the actual Linux coding and the GUI setup that I have to get around.
Thanks again |
All times are GMT -5. The time now is 02:09 AM. |