Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Unhappy Can't place my website

    Sorry if this question has been answered before, but I couldn't the answer here...

    A few months ago I got my hands on an old computer. The computer is worthless as normal computer (with games, applications etc.), so I wanted to make a server from it. I've installed Ubuntu and learned some Linux basisc. Then I've installed Apache, PHP and MySQL, and now I want to test if my website-in-making is working online. But when I want to place my index.html file in /var/www, it says I don't have the rights to do so. "No problem", I would say. I already learned how to use chmod, so why would this be different? Too bad, too bad. Although I've used chmod to give everyone the rights to read and write, I still can't place any file in it and I can't make any folder, no matter how many times I use chmod.

    What is wrong? Why can't I write /var/www while the properties of the folder tell me that I do can? Has it something to do with Apache?

    Thanks in advance


  2. #2
    Just use sudo cp to copy your html. Or, you can simply enable the root account and login and switcht to su to copy the files. I usually configure Samba and share out the /var/www directory via Samba, that way I never have to touch the servers unless I need to reconfigure.

  3. #3
    I forgot to mention that I use the Desktop version, and that I have about the same problem with Samba

  4. $spacer_open
  5. #4
    Well then, I would tackle one fire first. I wouldn't chmod on the /var/www directory for security implications. I would simply login and use the CLI and do a sudo cp from your source to the destination (/var/www).

    The desktop version has no bearing on this, since you are merely running X atop apache, mysql and the other dameons you've installed.

  6. #5
    Lol, I said I knew a few basics, but that doesn't make me an expert :P :P. What's CLI?

  7. #6
    command line interface

  8. #7
    And how do I use a sudo cp?

  9. #8
    can you please give us ls -ld /var/www and as which user you are trying to copy? if you are a normal user, the root user should allow you to do su.

  10. #9
    Sorry, but if he/she hasn't enabled the root account in Ubuntu, you can only sudo to gain root. However, if he/she wants to enable root, type sudo passwd and type and confirm the new root password. Once this is done, you can login as root and su as another user.

  11. #10
    Ok, I've asked a friend of mine to help me (goes a little faster) and I've got a few commands to try. I'll see if this works first. (BTW, I do have the root account enabled)...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts