Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
Hi, I installed Ubuntu (64-bit) in Oracle VirtualBox. In apache directory I can't change any file or copy any file in it, like I don't have authorization. I'm the only ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2013
    Posts
    8

    Apache in Ubuntu problem


    Hi,
    I installed Ubuntu (64-bit) in Oracle VirtualBox.
    In apache directory I can't change any file or copy any file in it, like I don't have authorization.
    I'm the only user (admin).
    Then I installed Ubuntu server (64-bit) and I have the same problem.
    How can I fix this?

    regards

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,638
    The default location for a web site in Linux is /var/www which is outside of any users home directory. This means you need root privileges to do more than read the files. In Ubuntu, when using the command line this is done by prefixing a command with sudo and supplying your password when asked. When entering your password it will look like nothing is happening.

    so
    Code:
    cd /var/www
    cp /path/to/some/file .
    becomes
    Code:
    cd /var/www
    sudo cp /path/to/some/file .
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  3. #3
    Just Joined!
    Join Date
    Apr 2013
    Posts
    8
    Capture.JPG
    is this ok?

  4. $spacer_open
    $spacer_close
  5. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,638
    So from your screen shot it looks like you are logged in as root (which I didn't think Ubuntu did) so you may not need the sudo after all. It also looks like that is a directory rather than a file so it's a slightly different copy command.
    Code:
    sudo cp -R /path/to/some/folder/* .
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  6. #5
    Just Joined!
    Join Date
    Apr 2013
    Posts
    8
    sorry, it doesn't work. It say: cp: cannot create regular file "name of the file": read-only file system
    the same for all files in the directory...

  7. #6
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,638
    Are you running this live or have you installed it?
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  8. #7
    Just Joined!
    Join Date
    Apr 2013
    Posts
    8
    installed.

  9. #8
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,638
    Hmmm... curious... Downloading ubu server now for a VM.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  10. #9
    Just Joined!
    Join Date
    Apr 2013
    Posts
    8
    i will try it on PC and see if...
    thanx...

  11. #10
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Booting Ubuntu from a iso in VBox is not the same as installing. After booting Ubuntu in VirtualBox, did you select to install it rather than trying it? Did you create a virtual drive for it? I believe the current Ubuntu installed would need 5+GB. The error you are getting about a read-only filesystem would be the expected behavior running from a CD/DVD or a booted iso file.

Page 1 of 2 1 2 LastLast

Posting Permissions

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